MedAI is a comprehensive, AI-powered healthcare management and telemedicine platform designed for patients, doctors, and administrators. Built for the 2025 Hackathon, MedAI leverages advanced AI models (Google Gemini, HuggingFace) and deep learning to enhance diagnosis, streamline consultations, and empower users with actionable health insights.
- Video Calls: Patients and doctors connect via secure Jitsi-powered video calls.
- Live Chat: Real-time chat during consultations, with session-aware input management.
- Webcam Symptom Detection: Capture snapshots during calls; AI (Gemini Vision) detects visible symptoms (e.g., rashes, swelling).
- Meeting Summarization: Gemini AI summarizes chat and findings, extracting diagnosis, medicines, and next steps for medical records.
- Upload Reports: Patients upload PDFs or images of medical reports.
- Gemini AI Analysis: Suggests relevant doctor specializations and explains reasoning.
- Direct Appointment Booking: Book recommended specialists instantly.
- Brain Tumor MRI: Upload MRI scans; deep learning model classifies tumor type.
- Cataract Detection: Eye scans analyzed for cataract presence.
- Chest X-Ray (PneumaScan): Integrated link to PneumaScan for AI-powered pneumonia detection.
- Symptom-Based Prediction: Select symptoms, get AI-driven disease predictions (using classical ML models).
- Community Blog: Doctors/admins post articles; patients explore curated health content.
- Personalized Dashboards: Manage appointments, view history, access AI tools.
- Profile Management: Update personal and professional details.
- User & Doctor Management: Approve doctors, manage users, view analytics.
- System Analytics: Metrics on users, doctors, appointments.
- Medical Q&A: AI chatbot answers health queries, logs chat history.
- Frontend & App Framework: Streamlit
- AI/ML: Google Gemini API (Vision & Text), HuggingFace, TensorFlow/Keras (custom models)
- Database: Firebase Firestore
- Authentication: Custom (with Firebase)
- Deployment: Streamlit Cloud / Local
MedAI/
├── app.py # Main Streamlit entrypoint
├── requirements.txt # Python dependencies
├── firebase_config.py # Firebase setup
├── service-account-key.json # Firebase credentials (secure!)
├── static/ # Static files (CSS, images)
├── models/
│ ├── csv/ # Training data for disease prediction
│ └── pkl/ # Pretrained ML/DL models
├── utils/ # Helper modules (auth, db, chatbot, etc)
├── functions/ # All Streamlit page logic
│ ├── home.py
│ ├── patient_dashboard.py
│ ├── doctor_dashboard.py
│ ├── admin_dashboard.py
│ ├── appointment.py
│ ├── disease_predictor.py
│ ├── blog.py
│ ├── scans.py
│ ├── video_call.py
│ ├── patient_report_analysis.py
│ ├── history.py
│ └── chatbot.py
└── ...
- Authentication: All sensitive features require user login.
- Session Management: Secure session state for user context.
- Data Privacy: Medical data is never shared outside the platform. API keys are stored securely.
This project utilizes several open source AI models and APIs, especially from Hugging Face, to power its medical features:
- Model: Custom-trained Scikit-learn model (see
models/pkl/disease_prediction_model.pkl) - Usage: Predicts probable diseases based on user symptoms.
- Model:
aaditya/Llama3-OpenBioLLM-70B(via Hugging Face Inference API) - Usage:
- Medical Q&A Chatbot
- Ayurveda/Homeopathic diagnosis suggestions
- API Endpoint:
https://router.huggingface.co/nebius/v1/chat/completions - Integration: Used in
functions/chatbot.py,functions/disease_predictor.py, andutils/chatbot.py.
- Users are prompted to provide their Hugging Face API key for LLM-powered features.
If you use or extend this project, please credit the original model authors and Hugging Face!
git clone https://github.com/siddh-coder/MedAI.git
cd MedAIpip install -r requirements.txt- Place your Firebase
service-account-key.jsonin the root directory. - Configure your Firebase project in
firebase_config.py.
- Add your Google Gemini API key to Streamlit secrets:
- In
.streamlit/secrets.toml:GEMINI_API_KEY = "your-gemini-key"
- In
- (Optional) Add HuggingFace API key for chatbot:
HF_API_KEY = "your-hf-key"
streamlit run app.py- Gemini API: Used for text and vision-based inference (symptom detection, summarization, report analysis).
- Custom Models: Brain tumor and cataract detection models (Keras/TensorFlow, stored in
models/pkl/). - Disease Prediction: Classical ML model using symptom data (
models/csv/Training.csv). - Open source Hugging Face models :
aaditya/Llama3-OpenBioLLM-70B - Training Script for Brain Tumor Classification : https://colab.research.google.com/drive/1byZm5dxZmhVTnx9aNt8sU5Qz-UepRJvN?usp=sharing
- Seamless AI Integration: Real-time AI feedback during video calls.
- Multi-Modal Analysis: Text, image, and chat data fused for holistic insights.
- Cross-App Linking: PneumaScan integration for advanced pneumonia detection.
- User-Centric Design: Intuitive dashboards for every user type.
- Code: Well-commented, modular Python (see
functions/andutils/). - Issues: Use GitHub Issues for bugs/feature requests.
- Siddharth Tripathi(IMT2024011) (Lead Developer)
This project is for hackathon/demo purposes. Contact the authors for production/commercial use.
- Google for Gemini API
- HuggingFace
- Streamlit
- Firebase
- All open-source contributors
Good luck, judges! Explore MedAI and experience the future of AI-driven healthcare.
