A Flask-based web application that summarizes medical reports in simple, easy-to-understand language using LLaMA 3. Upload PDF files, extract relevant health information, and optionally translate the output into multiple languages.
```
project-root/
│
├── backend/
│ ├── app.py # Main Flask app
│ └── uploads/ # Directory for uploaded PDFs
│
├── frontend/
│ ├── static/ # CSS/JS files
│ └── templates/
│ └── index.html # Frontend UI
│
├── requirements.txt # Required Python libraries
└── README.md # This file
```
- 📄 Upload PDF medical reports
- 🧠 Extract:
- Patient Info
- Diagnosis Overview
- Medical History
- Prescription Summary
- Treatment Plan
- Lifestyle Recommendations
- Overall Summary
- 🌍 Multilingual support
- 💬 LLaMA 3 powered backend
- 🖥️ User-friendly interface
- Frontend: HTML, CSS, JavaScript, Jinja2
- Backend: Python, Flask
- LLM: LLaMA 3 via Ollama
- PDF Parser: PyPDF2
- Markdown Rendering: markdown2
https://ollama.com/downloadOllama #to check if ollama is properly installedollama run llama3 git clone https://github.com/your-username/medical-report-summarizer.git
cd medical-report-summarizerpython -m venv venv
source venv/bin/activate # On Windows use: venv\\Scripts\\activatepip install -r requirements.txtcd backend
python app.pyVisit `http://127.0.0.1:5000\` in your browser.
| Metric | Score |
|---|---|
| ROUGE-L | 0.1943 |
| BLEU | 0.2616 |
| BERTScore F1 | 0.8837 |
| BERT Precision | 0.9035 |
| BERT Recall | 0.8648 |
- Ensure Ollama and the LLaMA 3 model are set up correctly.
- The model may need an internet connection or local cache for best performance.
- Translation quality may vary by language and report structure.