How to use from
Docker Model Runner
docker model run hf.co/mou11/medical-report-generator
Quick Links

Medical Report Generator

Python LLaMA FHIR HuggingFace

Live Demo

πŸ‘‰ Try it on Hugging Face Spaces

Overview

An end-to-end clinical report generation pipeline that generates structured medical reports from patient data, detects hallucinations using NLI, outputs FHIR R4 compliant JSON, and exports professional PDF reports.

Results

Report Type BERTScore F1 Safety Score
Radiology 0.8628 0.625
Discharge Summary 0.9045 1.0
Lab Report 0.8129 0.375

Hallucination Detection

Report Type Total Claims Hallucination Rate Safety Score
Radiology 4 0.375 0.625
Discharge 1 0.0 1.0
Lab 4 0.625 0.375

Features

  • Generates 3 types of clinical reports: Radiology, Discharge Summary, Lab Report
  • Hallucination detection using NLI (cross-encoder/nli-deberta-v3-base)
  • FHIR R4 compliant JSON output (HL7 healthcare standard)
  • BERTScore and ROUGE evaluation metrics
  • Professional PDF export with quality assessment table
  • Gradio web interface

Architecture

Patient Data β†’ Report Generation (LLaMA 3.3 70B via Groq) β†’ Hallucination Detection (DeBERTa NLI) β†’ Evaluation (BERTScore + ROUGE) β†’ FHIR R4 JSON β†’ PDF Export

Tech Stack

Component Tool
LLM Groq β€” LLaMA 3.3 70B
Hallucination Detection cross-encoder/nli-deberta-v3-base
Evaluation BERTScore + ROUGE
FHIR Output HL7 R4 JSON
PDF Export ReportLab
UI Gradio
Platform Google Colab (T4 GPU)

How to Run

  1. Get a free Groq API key at console.groq.com
  2. Open app.py in Google Colab
  3. Add your key to Colab Secrets as GROQ_KEY_1
  4. Run all cells in order

Medical Disclaimer

This system is for educational and research purposes only. It does not provide medical advice. Always consult a qualified healthcare professional for medical decisions.

Project Status

βœ… Report generation pipeline complete βœ… Hallucination detection implemented βœ… FHIR R4 compliant output βœ… PDF export working βœ… Gradio demo deployed on Hugging Face Spaces

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for mou11/medical-report-generator

Finetuned
(1033)
this model