Skip to content

This forked repository is based on a project developed by Karan Jajoria and me. It features MediBot, a Flask-based app using PyPDF2 and LLaMA 3 (Ollama) to extract and summarize medical PDFs into sections like diagnosis, prescription, and more, with translation support.

Notifications You must be signed in to change notification settings

AdityaSharma12004/Medicos_Summarizer_Bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🩺 Medical Report Summarizer

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 Structure

``` 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
```


🚀 Features

  • 📄 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

🛠️ Tech Stack

  • Frontend: HTML, CSS, JavaScript, Jinja2
  • Backend: Python, Flask
  • LLM: LLaMA 3 via Ollama
  • PDF Parser: PyPDF2
  • Markdown Rendering: markdown2

🧪 Get Started With Ollama


1. Make sure your Ollama is installed properly, for that go to the website

https://ollama.com/download

2. Setup Ollama application on your local machine

3. To Install a model onto your system

Ollama #to check if ollama is properly installed
ollama run llama3 

🧪 Installation


1. Clone the repository

git clone https://github.com/your-username/medical-report-summarizer.git
cd medical-report-summarizer

2. Create a virtual environment

python -m venv venv
source venv/bin/activate  # On Windows use: venv\\Scripts\\activate

3. Install dependencies

pip install -r requirements.txt

4. Run the app

cd backend
python app.py

Visit `http://127.0.0.1:5000\` in your browser.

📊 Model Evaluation (Sample)

Metric Score
ROUGE-L 0.1943
BLEU 0.2616
BERTScore F1 0.8837
BERT Precision 0.9035
BERT Recall 0.8648

📌 Notes

  • 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.

About

This forked repository is based on a project developed by Karan Jajoria and me. It features MediBot, a Flask-based app using PyPDF2 and LLaMA 3 (Ollama) to extract and summarize medical PDFs into sections like diagnosis, prescription, and more, with translation support.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 94.3%
  • Python 2.7%
  • HTML 1.5%
  • CSS 1.2%
  • JavaScript 0.3%