baliddeki's picture
fix 4
1abf722

A newer version of the Gradio SDK is available: 5.33.1

Upgrade
metadata
title: Phronesis Medical Report Generator
emoji: 🧠
colorFrom: green
colorTo: gray
sdk: gradio
app_file: app.py
pinned: false
short_description: 'REPORT GEN AND CLASSIFICATION MODEL '

🧠 Phronesis: Medical Image Diagnosis & Report Generator

Phronesis is a multimodal AI tool that classifies medical CT scan images (DICOM or standard formats) and generates diagnostic reports using a combination of video classification and medical language generation.


πŸš€ Demo

Upload a set of DICOM (.dcm, .ima) or image (.png, .jpg) files representing slices of a CT scan. The model will:

  • 🏷️ Predict a class: acute, normal, chronic, or lacunar
  • πŸ“‹ Generate a short radiology report

Live App β†’


πŸ—οΈ Model Architecture

  • Vision Backbone: 3D ResNet-18 pretrained on Kinetics-400
  • Language Head: BioBART v2 (pretrained biomedical seq2seq model)
  • Bridge Module: Custom ImageToTextProjector to align visual features with the language model
  • CombinedModel: Unified architecture for classification + report generation

πŸ§ͺ Tasks

  • Image Classification: Categorizes brain CT scans into one of four classes.
  • Report Generation: Produces diagnostic text conditioned on image features.

πŸ–ΌοΈ Input Format

  • Minimum 1, maximum ~30 image slices per scan.
  • Acceptable file formats:
    • DICOM (.dcm, .ima)
    • PNG, JPEG

The model will sample or pad the series to 16 frames for temporal context.


πŸ“¦ Dependencies

This app uses:

  • torch
  • transformers
  • torchvision
  • huggingface_hub
  • pydicom
  • gradio
  • PIL, numpy

πŸ” Notes

  • This demo loads a private model from the Hugging Face Hub. Set your HF_TOKEN as a secret for the space if needed.
  • Do not use for real clinical decisions – intended for research/demo only.

πŸ™‹β€β™‚οΈ Credits

Developed by @baliddeki

Model weights: baliddeki/phronesis-ml
Language model: GanjinZero/biobart-v2-base


πŸ“„ License

MIT or Apache 2.0 (add yours here)