Skip to content

oneVisionary/ERINE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI: https://onevisionary.github.io/blood_report_analyser.github.io/

🩸 Blood Report Summarizer

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.

✨ Features

  • 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

🛠️ Tech Stack

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

📋 Prerequisites

  • Python 3.8 or higher

  • API keys for:

    • Baidu Layout Parsing API
    • OpenRouter API

🚀 Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd blood-report-summarizer

2. Create & Activate Virtual Environment

python -m venv venv

Activate the environment:

Windows

venv\Scripts\activate

macOS / Linux

source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

Create 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

🔑 API Setup

Baidu Layout Parsing API

  1. Visit Baidu AI Studio
  2. Apply for Layout Parsing API access
  3. Generate your API token
  4. Add the token to the .env file

OpenRouter API

  1. Visit OpenRouter
  2. Sign up or log in
  3. Generate an API key
  4. Add the key to the .env file

The free tier is sufficient for testing and demos.


▶️ Running the Application

python app.py

The application will be available at:

http://localhost:5000

🧪 Usage

  1. Upload a blood test report PDF using drag & drop or file selection

  2. Click the Process Report button

  3. View results:

    • Extracted report pages as images
    • Raw extracted text
    • AI-generated blood report summary

📌 Future Enhancements

  • Multi-language support
  • Downloadable summary reports (PDF)
  • Visual highlighting of abnormal values
  • User authentication and report history

📄 License

This project is intended for educational and demonstration purposes.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors