NeuroDoc is a Flask-based offline AI application designed to analyze documents (PDFs/images) using OCR and summarization models. It extracts text from uploaded documents, generates human-readable summaries, and allows users to download themβall without requiring internet access during inference.
- π Upload PDF or image documents
- π Extract text using OCR (Tesseract)
- π§ Summarize text using a Transformer-based model (
facebook/bart-large-cnn) - πΎ Save and download summaries
- π Web-based interface built with Flask
- π΄ Runs offline after model download
NeuroDoc/
β
βββ app.py # Main Flask backend
βββ requirements.txt # Python dependencies
βββ Procfile # For Render deployment
βββ render.yaml # Optional: Render config
β
βββ templates/
β βββ index.html # Main frontend UI
β
βββ static/ # Static files (CSS/JS)
β
βββ uploads/ # Uploaded documents (auto-created)
βββ summaries/ # Generated summaries (auto-created)
β
βββ neurodoc_core/ # Core logic
β βββ ocr_engine.py # OCR using PyMuPDF + Tesseract
β βββ summarizer.py # Summarization logic
Prerequisites:
- Python 3.8+
- Tesseract OCR installed on system
# Clone the repo
git clone https://github.com/BABIN-JOE/NeuroDoc.git
cd NeuroDoc
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Run the app
python app.pyThen open http://localhost:5000 in your browser.
| Task | Model | Source |
|---|---|---|
| OCR | Tesseract + PyMuPDF | Local |
| Summarization | facebook/bart-large-cnn | HuggingFace Transformers |
You can download and cache the BART model beforehand to make the app work fully offline.
- Go to https://render.com
- Click "New Web Service"
- Connect your GitHub repo
- Set:
- Build command:
pip install -r requirements.txt - Start command:
gunicorn app:app
- Build command:
- Select Free Plan
- Click Deploy
Make sure your
requirements.txtandProcfileare present at the root.
- JPG / PNG / BMP
- TIFF (if Tesseract supports it)
- Summaries and uploads are stored locally in
/summariesand/uploads - You can customize output format, compression, or add highlight detection easily
- Make sure Tesseract is installed and added to
PATH
Babin Joe
π Portfolio β’ GitHub β’ LinkedIn
This project is open-source and available under the MIT License.