--- 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/`.