Spaces:
Sleeping
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
Professional Medical AI Assistant with Intelligent User Detection
π― 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:
- Get your API key from Moonshot AI Platform
- Add it to your Space secrets as
KIMI_API_KEY - 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
