hung-k-nguyen's picture
document-classification-demo — open-vocab, zero-shot Gradio demo
b137257
|
Raw
History Blame Contribute Delete
1.35 kB

A newer version of the Gradio SDK is available: 6.24.0

Upgrade
metadata
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 · leaderboard · 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/.