An AI-powered clinical diagnostic platform with an impressive accuracy of 92.7%
Features · Screenshots · Architecture · Quick Start · Algorithm
MedAI Suite represents a cutting-edge medical diagnostic platform that utilizes TF-IDF weighted symptom matching to accurately identify diseases based on patient-reported symptoms across 41 conditions and 132 clinical indicators. The platform includes mental wellness assessments (PHQ-9), BMI tracking, AI-driven medical advice via Google Gemini, and the capability to generate clinical reports in PDF format.
Developed as a dual-release system: a standalone Python desktop application and a modern full-stack web application.
| Module | Description | Technology |
|---|---|---|
| 🔬 Diagnostic Engine | TF-IDF symptom matching with IDF rarity weighting, F-beta scoring, and penalties for missed symptoms | Python, pandas |
| 🧠 Mental Wellness | PHQ-9 standardized depression screening with severity mapping (0–27) | React |
| 📊 BMI & Nutrition | Age-specific dietary guidelines and a BMI calculator with reference charts | Recharts |
| 🤖 AI Medical Advisor | Conversational health guidance powered by Google Gemini | Gemini API |
| 📄 Clinical Reports | Export patient history as professionally formatted PDF documents | jsPDF |
| 🚨 Emergency Directory | National emergency hotlines (112, 108, 104, 102, 1033) | React |
| 📱 Responsive Design | Desktop sidebar that transitions to a mobile bottom navigation bar | CSS Grid |
| Diagnostic Portal | Patient History |
|---|---|
![]() |
![]() |
| Nutrition & BMI | Mental Wellness (PHQ-9) |
|---|---|
![]() |
![]() |
| AI Medical Advisor | Emergency Contacts |
|---|---|
![]() |
![]() |
MedAI-Suite/
├── PYTHON/ ← Release 1: Standalone Desktop Application
│ ├── askBot.py # Decision tree diagnostic engine
│ ├── gptBot.py # Gemini-powered chat interface
│ ├── mainWind.py # Tkinter main window
│ ├── Data/ # Training datasets (10,000+ records)
│ └── MasterData/ # Symptom descriptions & precautions
│
├── WEBDEV/ ← Release 2: Full-Stack Web Platform
│ ├── backend/
│ │ └── app.py # FastAPI + TF-IDF diagnostic engine
│ ├── frontend/
│ │ └── src/
│ │ ├── App.jsx # Router & navigation
│ │ └── pages/ # 6 feature modules
│ ├── Data/ # 10,000+ synthesized medical records
│ ├── Screenshots/ # Application screenshots
│ └── start_dev.sh # One-click development launcher
│
├── .gitignore
└── README.md
Prerequisites: Python 3.13+, Node.js 18+
# 1. Clone the repository
git clone https://github.com/sonararadhya/Healthcare_Chatbot.git
cd Healthcare_Chatbot/WEBDEV
# 2. Set up the backend
python3 -m venv venv
./venv/bin/pip install fastapi uvicorn google-generativeai python-dotenv pandas
# 3. Configure the API key
echo "GEMINI_API_KEY=your_key_here" > backend/.env
# 4. Set up the frontend
cd frontend && npm install && cd ..
# 5. Launch the application
./start_dev.shBackend: http://127.0.0.1:8000 · Frontend: http://127.0.0.1:5173
cd PYTHON
pip install -r requirements.txt
python mainWind.pyThe engine employs a TF-IDF Weighted Scoring methodology instead of traditional machine learning classifiers:
| Issue with ML (Random Forest / Naive Bayes) | Our Solution |
|---|---|
| Inaccurate results with 1-2 symptoms (130+ features mostly zero) | Exact set-intersection matching |
| Non-deterministic outputs across multiple runs | 100% deterministic results |
| Requires model retraining for new diseases | Simply add a CSV row |
| Black-box predictions | Fully explainable scoring |
For each disease in the knowledge base:
1. OVERLAP = user_symptoms ∩ disease_symptoms
2. IDF WEIGHT = Σ log(total_diseases / diseases_with_symptom) ← rare symptoms count more
3. RECALL = weighted_overlap / weighted_user_input ← coverage of user symptoms
4. PRECISION = weighted_overlap / weighted_disease_total ← specificity to disease
5. F-BETA = ((1 + β²) × recall × precision) / (β² × precision + recall)
6. MISS PENALTY = 1 - 0.7 × (missed_weight / input_weight) ← penalize unexplained symptoms
7. FINAL SCORE = F-beta × miss_penalty
| Metric | Score |
|---|---|
| Top-1 Accuracy | 92.7% (38/41 diseases) |
| Top-3 Accuracy | 100% (41/41 diseases) |
| Dataset | 10,000 records, 41 diseases, 132 symptoms |
| Latency | < 5ms per query |
Backend: FastAPI · Python 3.13 · pandas · Google Gemini API
Frontend: React 19 · Vite · Recharts · Framer Motion · jsPDF · Lucide Icons
Data: 10,000+ synthesized clinical records · symptom severity mappings · precaution databases
📝 Last maintained: September 27, 2026 at 09:25 UTC





