Spaces:
Runtime error
Runtime error
| title: Unlimited OCR API | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 5.44.1 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| short_description: Baidu Unlimited-OCR β free document parsing API (ZeroGPU) | |
| tags: | |
| - ocr | |
| - document-parsing | |
| - vision-language | |
| - baidu | |
| - zero-gpu | |
| hardware: zero-a100 | |
| # Unlimited OCR API | |
| Free API for [baidu/Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) β one-shot long-horizon document parsing. | |
| Runs on **ZeroGPU** (free, no inference credits). β οΈ Subject to queue/timeout. | |
| ## Features | |
| - π Single image OCR (gundam/fast or base/accurate) | |
| - π Multi-image batch OCR | |
| - π PDF support (auto page extraction) | |
| - π‘ REST API at `/ocr` and `/ocr/pdf` | |
| ## API Usage | |
| ### Python (gradio_client) | |
| ```python | |
| from gradio_client import Client | |
| client = Client("Harry00/unlimited-ocr-api") | |
| # Single image OCR | |
| result = client.predict("doc.png", "gundam", "document parsing.", api_name="/handle_single") | |
| print(result) | |
| # PDF OCR | |
| result = client.predict("scan.pdf", "Multi page parsing.", api_name="/handle_pdf") | |
| print(result) | |
| ``` | |
| ### REST (curl) | |
| ```bash | |
| # Single image | |
| curl -X POST "https://harry00-unlimited-ocr-api.hf.space/ocr" \ | |
| -F "image=@document.png" \ | |
| -F "mode=gundam" \ | |
| -F "prompt=document parsing." | |
| curl -X POST "https://harry00-unlimited-ocr-api.hf.space/ocr/pdf" \ | |
| -F "pdf=@scan.pdf" \ | |
| -F "prompt=Multi page parsing." | |
| # Health check | |
| curl https://harry00-unlimited-ocr-api.hf.space/health | |
| ``` | |