Spaces:
Running on Zero
Running on Zero
| title: Document Classification Demo | |
| emoji: 🖼️ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: 6.20.0 | |
| app_file: app.py | |
| pinned: false | |
| license: other | |
| short_description: Classify any document image against labels you choose | |
| # Nutrient document classification demo | |
| Open-vocabulary, zero-shot: add candidate classes (a **label** + optional **description** per row), upload a | |
| document page, and the model ranks them — no fixed class list, no per-class training. Two models, one tab each: | |
| - **v2 flagship** — the commercial model (best accuracy). | |
| - **v1 (open-weight)** — a downloadable open-vocab classifier. | |
| → [model](https://huggingface.co/nutrientdocs/document-classification-v2) · | |
| [leaderboard](https://huggingface.co/spaces/nutrientdocs/document-classification-leaderboard) · | |
| [benchmark](https://huggingface.co/datasets/nutrientdocs/document-classification-benchmark) | |
| ## Secret required | |
| The **v2** model is commercial and loaded from a **private** repo, so this Space needs an `HF_TOKEN` | |
| **secret** (Settings → Variables and secrets) with read access to it. The weights are used server-side only | |
| and are never downloadable. Without the secret, the demo marks the v2 tab _unavailable_ and the open **v1** | |
| model still runs. Inference runs on **ZeroGPU**. | |
| Sample document images for quick testing are in `examples/`. | |