Spaces:
Running
Running
A newer version of the Gradio SDK is available: 6.15.2
metadata
title: Card & Letterhead OCR Extractor
emoji: πͺͺ
colorFrom: red
colorTo: green
sdk: gradio
app_file: app.py
app_port: 7860
pinned: false
Visiting Card & Letterhead OCR Extractor
Extracts structured contact data from visiting cards and letter headers/footers using a two-step NVIDIA AI pipeline:
nemoretriever-ocr-v1 β raw text β nvidia-nemotron-nano-9b-v2 β structured JSON
Extracted Fields
| Field | Description |
|---|---|
| Company Name | Firm / organisation name |
| Contact Person | Individual's name |
| Designation | Job title / role |
| Mobile | Mobile number(s) |
| Phone | Landline / office number(s) |
| Email address(es) | |
| Address | Full postal address |
| PIN | PIN / ZIP / postal code |
| City / State / Country | Location breakdown |
| GST Number | 15-char GSTIN |
| Website | URL |
| Fax | Fax number |
Files in this Space
| File | Purpose |
|---|---|
app.py |
FastAPI app β OCR pipeline + serves index.html at / |
index.html |
Frontend UI (drop / paste / browse images) |
requirements.txt |
Python dependencies |
README.md |
This file |
No Dockerfile needed β HF Spaces handles the container automatically with
sdk: gradio.
Setup on Hugging Face Spaces
- Create a new Space β SDK: Gradio
- Upload:
app.py,index.html,requirements.txt,README.md - Go to Settings β Variables and secrets β add secret:
- Name:
NVIDIA_API_KEY - Value: your
nvapi-...key from build.nvidia.com
- Name:
- Space builds automatically. The UI appears at your Space URL.
Local Usage
pip install fastapi uvicorn requests python-multipart pydantic
export NVIDIA_API_KEY=nvapi-YOUR_KEY_HERE
python app.py
# Open http://localhost:7860
How to Use the UI
- Click the drop zone to browse files
- Drag & drop an image onto the drop zone
- Paste (
Ctrl+V/βV) a screenshot or copied image β no file needed! - Switch to Batch mode to process up to 10 cards at once
- Use Copy JSON or Copy CSV row to export results