An end-to-end AI ecosystem that combines multiple machine learning models into a unified healthcare platform. Users input symptoms or queries → system delivers diagnoses, precautions, medication alternatives, risk scores, and instant medical answers.
- Predicts diseases from symptoms using RandomForest Classifier
- Provides: medical description, precautions, medication suggestions, diet recommendations
- Finds alternative medicines using NLP + Cosine Similarity
- Matches based on ingredients and properties
- LightGBM & EasyEnsemble classifiers
- Inputs: age, BMI, smoking, medical history
- Output: personalized risk score + recommendations
- Mistral-7B-Instruct LLM via Hugging Face
- RAG (Retrieval-Augmented Generation) with FAISS vector database
- Fact-based, fast, relevant medical answers
| Component | Technologies |
|---|---|
| ML Models | RandomForest, LightGBM, EasyEnsemble, Scikit-learn |
| NLP | TF-IDF, Cosine Similarity, Transformers |
| LLM & RAG | Mistral-7B, Hugging Face, FAISS |
| Backend | Python, FastAPI, Pandas, NumPy |
| Deployment | Docker, CI/CD (optional) |
Health_app/
│ ├── models/ # Trained ML models
│ │ ├── first_feature_model.pkl
│ │ ├── second_feature_model.pkl
│ │ └── third_feature_model.pkl
│ ├── medi_bot/ # LLM chatbot implementation
│ │ ├── connect_memory.py # Base memory connections
│ │ └── connect_memory_llm.py # LLM-specific memory handling
│ └── utils/ # Helper functions
│ └── heart_disease.jpg # Heart visualization asset
├── data/
│ ├── datasets/
│ │
│ └── vector_store/
│ ├── deb.faiss # FAISS database binary
│ └── index.faiss # FAISS index file
├── requirements.txt
├── Dockerfile
└── README.md
# Clone repository
git clone https://github.com/Addisu-Amare/Health_app.git
cd Health_app
# Create conda environment with Python 3.9
conda create -n health_app python=3.9 -y
# Activate environment
conda activate health_app
# Install dependencies
pip install -r requirements.txt
then run main.py| Endpoint | Method | Input | Output |
|---|---|---|---|
/predict/disease |
POST | Symptoms list | Disease + precautions + diet |
/recommend/drug |
POST | Drug name | Alternative medicines |
/assess/heart-risk |
POST | Age, BMI, smoking, history | Risk score + recommendations |
/chat/medical |
POST | User query | AI medical response |
- Algorithm: RandomForest Classifier
- Features: 132 symptoms (one-hot encoded)
- Algorithm: NLP + Cosine Similarity
- Features: TF-IDF vectors of drug ingredients
- Algorithm: LightGBM + EasyEnsemble
- Features: Age, BMI, smoking, BP, cholesterol, etc. )
User Query
↓
[connect_memory.py] ← FAISS Vector Store (deb.faiss + index.faiss)
↓
[connect_memory_llm.py] ← Mistral-7B-Instruct (Hugging Face)
↓
RAG-enhanced response
↓
User
This system is designed for healthcare accessibility — especially in regions with limited medical infrastructure. It's:
- ✅ Deployable — not just a demo
- ✅ Evidence-driven — RAG ensures factual responses
- ✅ Scalable — API-first architecture
- ✅ Explainable — every recommendation comes with context
Contributions welcome! Open an issue or submit a PR.
MIT © Addisu Amare
Addisu Amare
GitHub | LinkedIn | Email
Making healthcare smarter, faster, and accessible — one query at a time.