End-to-End ML-Powered Disease Prediction Web Application
Health-Insight is a full-stack web application that integrates multiple machine learning models with a Flask backend to provide real-time disease risk predictions. The system is designed with production-style considerations such as feature consistency, model serialization, dynamic form generation, and robust error handling.
- Multi-disease prediction (Diabetes, Heart, Kidney, Liver, Cancer)
Individual ML model per disease
Dynamic input forms based on disease-specific features
Flask REST backend with real-time inference
Model persistence using Pickle
Input validation and categorical encoding
Scalable and modular project structure
Machine Learning: Scikit-learn, Pandas, NumPy
Models: RandomForestClassifier
Frontend: HTML, CSS, JavaScript
Serialization: Pickle
Health-Insight/ <br>
│ <br>
├── app.py <br>
├── models/ <br>
│ ├── diabetes.pkl <br>
│ ├── heart.pkl <br>
│ ├── kidney.pkl <br>
│ ├── liver.pkl <br>
│ └── cancer.pkl <br>
│ <br>
├── training/ <br>
│ ├── diabetes.py <br>
│ ├── heart.py <br>
│ ├── kidney.py <br>
│ ├── liver.py <br>
│ └── cancer.py <br>
│ <br>
├── datasets/ <br>
│ ├── diabetes.csv <br>
│ ├── heart.csv <br>
│ ├── kidney.csv <br>
│ ├── liver.csv <br>
│ └── cancer.csv <br>
│ <br>
├── templates/ <br>
│ ├── index.html <br>
│ ├── form.html <br>
│ └── result.html <br>
│ <br>
├── static/ <br>
│ ├── css/ <br>
│ └── js/ <br>
│ <br>
└── README.md <br>
<br>
-
- Each disease has a separately trained ML model.
-
Handling categorical encoding in production ML systems
-
Debugging real-world ML deployment issues
-
Designing modular and scalable backend architecture
-
REST API endpoints
-
Authentication & user history
-
Model monitoring & retraining pipeline
-
Dockerized deployment
- Models are serialized using Pickle.
- Flask dynamically loads the correct model and feature set.
- User inputs are validated and transformed before prediction.
- Predictions are returned in real time via the web interface.
pip install -r requirements.txt <br>
python app.py <br>