CoolFace
Apppublic

PatSnap/Document-Processing

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
9likes
App README

Document Processing

Gradio demo with two tabs sharing one Bearer API key from the environment.

Tabs

TabGatewayNotes
Smart Dochttps://connect.zhihuiya.com/rd-llm/v1/documents/doc_parsingMultipart upload · output_format=both · 10 MB max
Translationhttps://connect.zhihuiya.com/hiro_translationstream: SSE via POST /translate; fast: async submit + poll (POST /translate/asyncGET /translate/async/{taskId})

Auth

Set under Space Settings → Variables / Secrets (or local env):

  1. 1.HIRO_API_KEY (preferred)
  2. 2.else RD_LLM_API_KEY

No API key field in the UI.

Files

FilePurpose
app.pyGradio UI (tabs + streaming translation + document parse)
api_client.pyHTTP clients for translation + Smart Doc
requirements.txtPython dependencies (requests; Gradio is pre-installed on Spaces)

Local run

bash
pip install -r requirements.txt
export HIRO_API_KEY="sk-..."   # or RD_LLM_API_KEY
python app.py

Check out the Spaces config reference.