Med-X_25.10.8 / README.md
DeepRat's picture
Update README.md
abd7d70 verified
metadata
title: MedeX - Medical AI System
emoji: πŸ₯
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
pinned: true
license: mit
short_description: AI medical assistant for professionals and students!

πŸ₯ MedeX - Advanced Medical AI Intelligence System

MedeX Banner

Professional Medical AI Assistant with Intelligent User Detection

Python Streamlit License

πŸš€ Try Demo | πŸ“– Documentation | 🀝 Contribute

🎯 Overview

MedeX represents a sophisticated evolution in medical AI technology, powered by Kimi K2-0711-Preview with RAG (Retrieval-Augmented Generation) capabilities. The system automatically adapts responses for healthcare professionals and patients, providing accurate medical information with built-in safety protocols.

✨ Key Features

🧠 Intelligent Detection

  • Automatic User Classification: Distinguishes between healthcare professionals and patients
  • Context-Aware Responses: Adapts language and technical detail accordingly
  • Emergency Recognition: Instantly identifies medical emergencies with appropriate protocols

πŸ“š Comprehensive Knowledge Base

  • ICD-10 Coded Conditions: Complete medical conditions database
  • Pharmaceutical Information: Drug interactions, dosages, and contraindications
  • Clinical Protocols: Evidence-based treatment guidelines
  • RAG-Enhanced Search: Semantic search through medical literature
  • Laboratory Values: Normal ranges and interpretation guidelines

πŸ”¬ Advanced Capabilities

  • Real-Time Streaming: Progressive response generation for better UX
  • Multi-modal Processing: Text consultations with image analysis capability
  • Web Search Integration: Real-time medical information retrieval
  • Structured Responses: Professional medical documentation format
  • Session Management: Intelligent conversation history and statistics

πŸ›‘οΈ Medical Safety

  • Built-in Disclaimers: Professional medical disclaimers on all responses
  • Emergency Protocols: Automatic activation for critical conditions
  • Professional Referral: Appropriate guidance for medical consultation
  • Quality Standards: Adherence to medical information standards

πŸš€ Quick Start

Try on Hugging Face Spaces

Simply click the app link at the top of this page to start using MedeX immediately!

Local Installation

# Clone the repository
git clone <repository-url>
cd MedeX-main

# Install dependencies
pip install -r requirements.txt

# Run Streamlit app
streamlit run streamlit_app.py

Docker Deployment

# Build Docker image
docker build -t medex-app .

# Run container
docker run -p 7860:7860 medex-app

πŸ’‘ Usage Examples

For Healthcare Professionals

"Paciente 65 aΓ±os, diabΓ©tico, dolor precordial de 2 horas de evoluciΓ³n"

MedeX will provide:

  • Detailed clinical analysis
  • Differential diagnoses with probabilities
  • Management protocols with specific dosages
  • Evidence-based guidelines references

For Patients

"Me duele el pecho y estoy preocupado"

MedeX will provide:

  • Clear, understandable explanation
  • Possible causes in simple terms
  • When to seek medical attention
  • Self-care recommendations

Emergency Queries

"Dolor torΓ‘cico intenso, no puedo respirar"

MedeX will:

  • 🚨 Activate emergency protocol
  • Provide immediate action steps
  • Emphasize calling 911
  • Guide until professional help arrives

πŸ—οΈ System Architecture

MedeX Ultimate RAG System
β”œβ”€β”€ Kimi K2-0711-Preview (LLM)
β”œβ”€β”€ RAG System (Semantic Search)
β”‚   β”œβ”€β”€ Medical Knowledge Base
β”‚   β”œβ”€β”€ Pharmaceutical Database
β”‚   └── Clinical Protocols
β”œβ”€β”€ User Detection Engine
β”œβ”€β”€ Emergency Protocol System
└── Streamlit Interface

πŸ”§ Configuration

Environment Variables

For Hugging Face Spaces, configure these in your Space settings:

  • KIMI_API_KEY: Your Moonshot AI API key (required)
  • STREAMLIT_SERVER_PORT: Port for Streamlit (default: 7860)

API Key Setup

The system uses Moonshot AI's Kimi API. Configure your API key:

  1. Get your API key from Moonshot AI Platform
  2. Add it to your Space secrets as KIMI_API_KEY
  3. Or use the default key in the code (for testing only)

πŸ“Š Technical Stack

  • LLM: Kimi K2-0711-Preview (Moonshot AI)
  • Framework: Streamlit 1.28+
  • RAG: Sentence Transformers + Scikit-learn
  • Container: Docker with Python 3.10
  • Deployment: Hugging Face Spaces

⚠️ Important Disclaimers

MEDICAL DISCLAIMER:

  • This system is for educational and informational purposes only
  • It does NOT provide medical advice, diagnosis, or treatment
  • It should NOT replace professional medical consultation
  • In case of medical emergency, call 911 immediately
  • Always consult qualified healthcare professionals for medical decisions

LIABILITY:

  • The developers and contributors are not liable for any medical decisions made based on information from this system
  • Users assume all responsibility for how they use this information
  • This is an AI system and may contain errors or inaccuracies

πŸ“ License

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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ‘₯ Authors

  • Medical AI Systems Team
  • Powered by Moonshot AI (Kimi K2)

πŸ™ Acknowledgments

  • Moonshot AI for Kimi K2-0711-Preview
  • Hugging Face for Spaces infrastructure
  • Medical community for knowledge validation
  • Open-source contributors

πŸ“§ Contact

For questions, issues, or suggestions:

  • Open an issue on GitHub
  • Contact through Hugging Face Spaces discussion

MedeX v25.83 Ultimate RAG

Advancing Medical AI for Better Healthcare