๐Ÿง  Brain CT Analyzer

Upload a brain CT scan image for AI-powered analysis. This tool uses the PaliGemma medical model with specialized medical fine-tuning to provide preliminary findings.

โš ๏ธ Important: This is for educational/research purposes only. Always consult qualified medical professionals.

๐Ÿ”‘ Requirements: This model requires accepting Google's PaliGemma license and HuggingFace authentication.

๐Ÿค– Model Status

  • Model Loaded: True
  • Device: cpu
  • CUDA Available: False
  • Model Object: PeftModelForCausalLM
  • Processor Object: PaliGemmaProcessor
  • PyTorch Version: 2.7.0+cu126

๐Ÿ“‹ Model Configuration

  • Base Model: google/paligemma-3b-mix-448
  • Medical Adapter: mychen76/paligemma-3b-mix-448-med_30k-ct-brain
  • Model Type: PEFT/LoRA Fine-tuned

โš ๏ธ Requirements

  • HuggingFace account with accepted license for PaliGemma
  • HuggingFace token authentication
  • PEFT library for adapter loading

Upload an image and click 'Analyze Brain Scan' to see results.

๐Ÿ“‹ Usage Instructions:

  1. Accept License: Go to google/paligemma-3b-mix-448 and accept the license
  2. Authenticate: Login with huggingface-cli login using your token
  3. Upload a brain CT scan image (JPEG or PNG)
  4. Optionally fill in patient information
  5. Click "Analyze Brain Scan" to get AI findings
  6. Review the results in the output panel

๐Ÿ”— Integration:

This interface can be integrated with your medical app using the Gradio API.

โœ… Based on Working Colab Code:

This version uses PEFT to load the medical fine-tuned adapter on top of the base PaliGemma model, exactly matching your working Google Colab setup.