Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Invoice Information Extractor
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
app_port: 7860
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Invoice Information Extractor
|
| 13 |
+
|
| 14 |
+
AI-powered REST API for extracting structured information from Indian tractor invoices.
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
- π **Text Extraction:** Dealer name, model name, horse power, asset cost
|
| 19 |
+
- ποΈ **Signature Detection:** Automatic signature detection with bounding boxes
|
| 20 |
+
- π **Stamp Detection:** Stamp detection with confidence scores
|
| 21 |
+
- π― **Validation:** Smart validation and error correction
|
| 22 |
+
- β‘ **Fast Processing:** ~3-5 seconds per invoice
|
| 23 |
+
|
| 24 |
+
## Models
|
| 25 |
+
|
| 26 |
+
- **YOLO**: Custom-trained signature/stamp detector
|
| 27 |
+
- **Qwen2.5-VL-7B**: Vision-language model for text extraction (4-bit quantized)
|
| 28 |
+
|
| 29 |
+
## API Documentation
|
| 30 |
+
|
| 31 |
+
Visit `/docs` for interactive API documentation.
|
| 32 |
+
|
| 33 |
+
## Quick Start
|
| 34 |
+
|
| 35 |
+
### Python
|
| 36 |
+
```python
|
| 37 |
+
import requests
|
| 38 |
+
|
| 39 |
+
url = "https://YOUR_USERNAME-invoice-extractor.hf.space/extract"
|
| 40 |
+
files = {"file": open("invoice.png", "rb")}
|
| 41 |
+
|
| 42 |
+
response = requests.post(url, files=files)
|
| 43 |
+
print(response.json())
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### cURL
|
| 47 |
+
```bash
|
| 48 |
+
curl -X POST "https://YOUR_USERNAME-invoice-extractor.hf.space/extract" \
|
| 49 |
+
-F "file=@invoice.png"
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Hardware
|
| 53 |
+
|
| 54 |
+
Requires GPU: T4 minimum (8GB VRAM recommended)
|