InsightOCR / README.md
0X100's picture
Add Gradio app for OCR and insight generation with Qwen and GPT-4
a7ce53f
---
title: InsightOCR
emoji: 💻
colorFrom: pink
colorTo: blue
sdk: gradio
sdk_version: 5.40.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: OCR + GPT-4 powered insight extractor for printed and handwr
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
# OCR and Insight Generator
This is a Gradio app that allows users to upload an image containing printed or handwritten text. It uses:
- **Qwen2.5-VL-7B-Instruct** (via Hugging Face) to extract text from the image
- **GPT-4.1-mini** (via OpenAI) to analyze the extracted text and return structured insights in Arabic
## Usage
1. Add your `.env` file with:
```
HF_TOKEN=your_huggingface_token
OPENAI_API_KEY=your_openai_key
```
2. Run locally with:
```
python app.py
```
3. Or deploy to Hugging Face Spaces.
## Deploying to Hugging Face Spaces
- Create a new Space (SDK: Gradio)
- Push this repo (with `app.py`, `requirements.txt`, and `README.md`)