Med AD π - AI-Powered Medicine Recommendation System

π₯ Med AD is an intelligent medicine recommendation system powered by Advanced AI and Machine Learning. Get instant medicine recommendations, AI health insights, and skin condition analysis!
π Features
AI-Powered Capabilities π€
- π§ Hugging Face Inference API: Advanced translation & health insights
- π¬ Skininve Cloud AI: Professional-grade skin condition analysis
- π Smart Translation: Hindi/Hinglish to English using NLLB-200 model
- π‘ AI Health Advisor: Powered by Microsoft Phi-3 model
- πΈ Image Analysis: Upload skin photos for AI diagnosis
Core Functionality
- π€ Advanced ML Model: TF-IDF vectorization with 15K features, n-grams 1-4
- π Massive Database: 248,000+ medicines with comprehensive information
- π§ 60+ Disease Categories: Cancer, Heart Disease, Diabetes, COVID, and more
- π Real-time Analytics: ML-based disease prevalence & severity calculation
- π¬ Interactive Chat: Natural conversation-based medicine search
User Experience
- π¨ Modern UI: Sleek navy blue gradient theme with glassmorphism effects
- π¬ Interactive Chat: Natural conversation-based medicine search
- π·οΈ Quick Symptom Buttons: 14 one-click symptom categories
- π¨ Emergency Mode: Quick access to emergency contacts
- πΊοΈ Pharmacy Finder: Locate nearby pharmacies (OpenStreetMap integration)
- π€ User Accounts: Optional login/registration (or use as guest)
π§ ML Technologies
- TF-IDF Vectorization: Advanced text matching with 15,000 features
- Cosine Similarity: Accurate medicine-symptom matching algorithm
- Smart Filtering: Body-part detection & symptom mapping
- Dynamic Analytics: Real-time prevalence calculation from 248K database
- Synonym Expansion: Comprehensive symptom synonym dictionary (30+ categories)
π Database Scale
- Primary Dataset: 248,218 medicines
- Secondary Dataset: 50,000 inventory items
- Disease Coverage: 60+ supported conditions
- Symptom Categories: 30 with extensive synonyms
π― Tech Stack
| Technology | Purpose |
|---|
| Python Dash | Web framework |
| scikit-learn | Machine learning (TF-IDF, cosine similarity) |
| Hugging Face API | AI translation & text generation |
| Skininve Cloud AI | Skin condition image analysis |
| Pandas & NumPy | Data processing & analysis |
| Plotly | Interactive data visualization |
| Flask-Login | User authentication |
| SQLite | User data storage |
AI Models Used π€
-
Translation: facebook/nllb-200-distilled-600M
- Multilingual translation (200+ languages)
- Hindi/Hinglish to English conversion
-
Health Insights: microsoft/Phi-3-mini-4k-instruct
- Medical advice generation
- Symptom-based recommendations
-
Skin Analysis: Skininve Cloud AI
- Dermatological condition detection
- Professional-grade image analysis
- Treatment recommendations
π» How to Use
Setup API Keys (Required)
-
Hugging Face API (Free tier available)
-
Skininve Cloud AI (Optional, for skin analysis)
- Sign up at: https://skininve.com/api
- Get API key from dashboard
- Add to
.env: SKININVE_API_KEY=your_key_here
Using the App
- Describe Symptoms: Type your symptoms in the chat (e.g., "headache and fever")
- Get Recommendations: AI will find matching medicines from 248K+ database
- View Analytics: See disease statistics, recovery rates, and severity levels
- AI Insights: Click "AI Insights" for personalized health advice
- Skin Analysis: Upload skin photos for AI-powered condition detection
- Find Pharmacies: Locate nearby pharmacies for purchasing medicines
Quick Symptom Search
Click any of the 14 quick symptom buttons for instant results:
- Headache, Fever, Cold & Cough, Stomach Pain
- Back Pain, Joint Pain, Allergy, Diabetes
- BP Issues, Anxiety, Skin Issues, Eye Problems
- Infection, Emergency
π Multilingual Support
The app supports Hinglish (Hindi-English mix):
- "Sir dard" β "headache"
- "Bukhar" β "fever"
- "Pet dard" β "stomach pain"
π Privacy & Security
- β
Optional user accounts with secure password hashing
- β
Guest mode available (no registration required)
- β
Session-based authentication
- β
No personal health data stored permanently
β οΈ Important Disclaimer
This application is for informational purposes only.
- Not a substitute for professional medical advice
- Always consult qualified healthcare professionals for diagnosis and treatment
- In case of emergency, contact local emergency services immediately
- Medicine recommendations are based on keyword matching, not medical diagnosis
π Version History
v4.1 (Current - AI-Powered)
- β
Integrated Hugging Face Inference API for translation & health insights
- β
Added Skininve Cloud AI for professional skin analysis
- β
Using NLLB-200 model for multilingual translation
- β
Using Microsoft Phi-3 for AI health advice
- β
Real-time image analysis with dermatological recommendations
- β
Optimized for Hugging Face Spaces deployment
v4.0 HF (Previous)
- Local rule-based translation & health advice
- Removed external API dependencies
- Disabled image analysis
v3.5
- Integrated Google Gemini AI
- MedAd 2.0 modules
π€ Contributing
Contributions welcome! This is an educational project aimed at:
- Learning ML-based recommendation systems
- Exploring healthcare applications of AI
- Building user-friendly health tech solutions
π License
MIT License - See LICENSE file for details
π Acknowledgments
- Medicine database compiled from public healthcare resources
- Built with Dash by Plotly
- ML powered by scikit-learn
- Inspired by the need for accessible healthcare information
Made with β€οΈ for better healthcare accessibility
For support or queries, please open an issue on the repository