HunyuanOCR is a lightweight, high-performance OCR application powered by the Tencent HunyuanOCR 1B model. It supports document parsing, text detection, translation, and custom prompts. The system outputs tables as HTML, formulas as LaTeX, and text in a structured markdown format.
requirements.txt:streamlit>=1.38.0
torch>=2.3.0
pillow>=10.0.0
accelerate>=0.33.0
transformers@git+https://github.com/huggingface/transformers@82a06db03535c49aa987719ed0746a76093b1ec4
git clone https://github.com/ikantkode/hunyuan-1b-ocr-app.git
cd hunyuan-ocr-app
python -m venv venv
source venv/bin/activate # Linux / Mac
venv\Scripts\activate # Windows
pip install -r requirements.txt
streamlit run app.py
docker-compose build
docker-compose up -d
http://localhost:8501Note: The Docker setup requires an NVIDIA GPU with CUDA support and the NVIDIA Container Toolkit installed.
hunyuan-ocr-app/
├── app.py # Main Streamlit app
├── requirements.txt # Python dependencies
├── Dockerfile # GPU-optimized container setup
├── docker-compose.yml # Docker Compose config
├── data/ # Stores temporary files
└── hOCR/ # (Optional) Additional project files, ignored in git
Note: The
venv/andhOCR/folders are ignored in Git and should not be pushed.
.txt.This project is for personal and research use. The OCR model is provided by Tencent via Hugging Face: tencent/HunyuanOCR.
6 commits
Python
87.8%
Dockerfile
12.2%
HunyuanOCR is a lightweight, high-performance OCR application powered by the Tencent HunyuanOCR 1B model. It supports document parsing, text detection, translation, and custom prompts. The system outputs tables as HTML, formulas as LaTeX, and text in a structured markdown format.
requirements.txt:streamlit>=1.38.0
torch>=2.3.0
pillow>=10.0.0
accelerate>=0.33.0
transformers@git+https://github.com/huggingface/transformers@82a06db03535c49aa987719ed0746a76093b1ec4
git clone https://github.com/ikantkode/hunyuan-1b-ocr-app.git
cd hunyuan-ocr-app
python -m venv venv
source venv/bin/activate # Linux / Mac
venv\Scripts\activate # Windows
pip install -r requirements.txt
streamlit run app.py
docker-compose build
docker-compose up -d
http://localhost:8501Note: The Docker setup requires an NVIDIA GPU with CUDA support and the NVIDIA Container Toolkit installed.
hunyuan-ocr-app/
├── app.py # Main Streamlit app
├── requirements.txt # Python dependencies
├── Dockerfile # GPU-optimized container setup
├── docker-compose.yml # Docker Compose config
├── data/ # Stores temporary files
└── hOCR/ # (Optional) Additional project files, ignored in git
Note: The
venv/andhOCR/folders are ignored in Git and should not be pushed.
.txt.This project is for personal and research use. The OCR model is provided by Tencent via Hugging Face: tencent/HunyuanOCR.
6 commits
Python
87.8%
Dockerfile
12.2%