UI: https://onevisionary.github.io/blood_report_analyser.github.io/
Blood Report Summarizer is a Flask-based web application that uses AI-powered document parsing and summarization to analyze blood test PDF reports and generate clear, structured, and easy-to-understand summaries.
The application extracts text and layout information from medical PDFs and leverages large language models to help users better understand their lab results through a simple, modern web interface.
-
PDF Upload Upload blood test reports using drag & drop or file browser
-
Layout-Aware Text Extraction Extracts structured text and images from PDFs using Baidu Layout Parsing API Handles tables, headings, and complex medical report layouts
-
AI-Powered Summarization Generates concise and structured summaries using OpenRouter AI Highlights key findings and abnormal values
-
User-Friendly Interface Clean, responsive UI with progress tracking Displays extracted pages, raw text, and AI-generated summary
-
Medical Disclaimer Clearly states that the output is AI-generated and not a replacement for medical professionals
- Backend: Flask (Python)
- PDF Processing: Baidu Layout Parsing API (ERNIE + PaddleOCR)
- AI Summarization: OpenRouter API
- Frontend: HTML, CSS, JavaScript
- Environment Management: Python virtual environment (
venv)
-
Python 3.8 or higher
-
API keys for:
- Baidu Layout Parsing API
- OpenRouter API
git clone <repository-url>
cd blood-report-summarizerpython -m venv venvActivate the environment:
Windows
venv\Scripts\activatemacOS / Linux
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root directory and add the following:
BAIDU_TOKEN=your_baidu_api_token_here
OPEN_ROUTER=your_openrouter_api_key_here- Visit Baidu AI Studio
- Apply for Layout Parsing API access
- Generate your API token
- Add the token to the
.envfile
- Visit OpenRouter
- Sign up or log in
- Generate an API key
- Add the key to the
.envfile
The free tier is sufficient for testing and demos.
python app.pyThe application will be available at:
http://localhost:5000
-
Upload a blood test report PDF using drag & drop or file selection
-
Click the Process Report button
-
View results:
- Extracted report pages as images
- Raw extracted text
- AI-generated blood report summary
- Multi-language support
- Downloadable summary reports (PDF)
- Visual highlighting of abnormal values
- User authentication and report history
This project is intended for educational and demonstration purposes.