Spaces:
Sleeping
Sleeping
File size: 1,844 Bytes
7a9a7a7 902caa8 7a9a7a7 2c87df0 7a9a7a7 902caa8 7a9a7a7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
title: Document Converter Pro
emoji: 📄
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---
# Document Converter Pro
Document Converter Pro is a Flask web app for:
- PDF OCR conversion with `ocrmypdf`
- Excel to CSV conversion with `pandas` and `openpyxl`
- Fast default OCR mode that skips pages that already contain text
- Streaming `.xlsx` conversion to reduce memory use on large workbooks
## Important: GitHub Pages will not run this app
This project uses Python and system OCR tools, so it cannot be hosted directly on GitHub Pages. GitHub Pages only serves static HTML/CSS/JavaScript.
Use GitHub as the source repository, then deploy the app to a Python/container host such as Hugging Face Spaces, Render, Fly.io, Railway, or any Docker-capable server.
## Deploy from GitHub to Hugging Face Spaces
1. Push this folder to a GitHub repository.
2. Create a Hugging Face Space.
3. Select **Docker** as the Space SDK.
4. In your GitHub repository settings, add:
- Repository secret `HF_TOKEN`: a Hugging Face access token with write access
- Repository variable `HF_SPACE`: your Space id, for example `yourname/document-converter-pro`
5. Push to the `main` branch, or run the **Deploy to Hugging Face Space** workflow manually from the GitHub Actions tab.
The included `Dockerfile` installs the required OCR system packages and starts `app.py` on port `7860`.
## Run locally
Install system dependencies first:
- `ocrmypdf`
- `tesseract-ocr`
- `poppler-utils`
- `ghostscript`
- `qpdf`
Then run:
```bash
pip install -r requirements.txt
python app.py
```
Open `http://localhost:7860`.
## Files
- `app.py`: deployable Flask app
- `Dockerfile`: container build for deployment
- `requirements.txt`: Python dependencies
- `.github/workflows/deploy-huggingface.yml`: optional GitHub Actions deployment workflow
|