BioGPT-chatbot / README.md
Blaiseboy's picture
Upload README.md
d30e914 verified
|
raw
history blame
4.79 kB
metadata
title: BioGPT Medical Assistant
emoji: πŸ₯
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit
short_description: AI pediatric medical chatbot powered by BioGPT
tags:
  - medical
  - healthcare
  - pediatric
  - biogpt
  - chatbot
  - medicine
  - health
models:
  - microsoft/BioGPT-Large
datasets: []

πŸ₯ BioGPT Medical Assistant

An AI-powered medical chatbot specialized in pediatric medicine, built with Microsoft's BioGPT model and deployed via Gradio.

🎯 Features

  • Specialized Medical AI: Powered by BioGPT-Large, trained on extensive medical literature
  • Pediatric Focus: Specialized knowledge in children's health and medicine
  • Evidence-Based: Responses based on medical research and clinical guidelines
  • Interactive Chat: User-friendly Gradio interface with medical-themed design
  • Safety First: Clear disclaimers and guidance on when to seek professional care

🩺 Capabilities

Medical Topics Covered:

  • Pediatric Symptoms: Fever, cough, rash, digestive issues
  • Treatment Guidance: Evidence-based treatment information
  • Emergency Signs: When to seek immediate medical attention
  • Prevention: Vaccination schedules, disease prevention
  • Development: Growth and developmental milestones

Key Features:

  • Real-time medical information retrieval
  • Context-aware responses using medical knowledge base
  • Conversational AI with natural language understanding
  • Memory-efficient deployment with model quantization
  • Comprehensive medical disclaimers and safety information

πŸš€ Technical Details

  • Base Model: Microsoft BioGPT-Large
  • Framework: Gradio for web interface
  • Deployment: Hugging Face Spaces
  • Optimization: 8-bit quantization for efficient GPU usage
  • Embeddings: Sentence transformers for context retrieval
  • Device Support: CUDA GPU with CPU fallback

⚠️ Important Medical Disclaimer

This AI assistant provides educational medical information only and is NOT a substitute for professional medical advice, diagnosis, or treatment.

Always Consult Healthcare Professionals For:

  • Medical diagnosis and treatment decisions
  • Prescription medications
  • Personalized medical advice
  • Emergency medical situations

Emergency Situations - Call Emergency Services:

  • Difficulty breathing or choking
  • Severe allergic reactions
  • Unconsciousness
  • Severe injuries
  • Persistent high fever (>104Β°F/40Β°C)

πŸ› οΈ Installation & Setup

For Local Development:

  1. Clone the repository:

    git clone <your-repo-url>
    cd biogpt-medical-chatbot
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the application:

    python app.py
    

For Hugging Face Spaces Deployment:

  1. Create a new Space on Hugging Face
  2. Choose "Gradio" as the Space SDK
  3. Upload the following files:
    • app.py
    • requirements.txt
    • README.md
  4. The Space will automatically build and deploy

πŸ“ File Structure

β”œβ”€β”€ app.py              # Main Gradio application
β”œβ”€β”€ requirements.txt    # Python dependencies
└── README.md          # This file

πŸ”§ Configuration

The chatbot automatically detects available hardware and configures accordingly:

  • GPU Available: Uses CUDA with 8-bit quantization
  • CPU Only: Falls back to CPU with appropriate settings
  • Model Loading: Attempts BioGPT-Large, falls back to smaller models if needed

πŸ’‘ Usage Tips

For Best Results:

  1. Be Specific: Ask detailed questions about symptoms or conditions
  2. Include Context: Mention age, duration of symptoms, etc.
  3. Medical Focus: Focus on pediatric and general medical topics
  4. Clear Language: Use clear, simple language in your questions

Example Queries:

  • "What causes fever in children?"
  • "My 3-year-old has been coughing for 2 days, what should I do?"
  • "When should I be concerned about my baby's breathing?"
  • "What are the signs of dehydration in infants?"

🀝 Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Microsoft Research for the BioGPT model
  • Hugging Face for model hosting and transformers library
  • Gradio for the web interface framework
  • Medical Community for evidence-based medical knowledge

πŸ“ž Support

For technical issues or questions about deployment, please open an issue in this repository.

For medical emergencies, always contact emergency services or healthcare professionals immediately.


Last updated: August 2025