Skip to content

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.

Notifications You must be signed in to change notification settings

Ganesh-a0576/Health-Insight-Using-Machine-Learning-And-Flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 Health-Insight using machine learing and flask

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.

🚀 Features

    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

🛠 Tech Stack

Backend: Python, Flask

Machine Learning: Scikit-learn, Pandas, NumPy

Models: RandomForestClassifier

Frontend: HTML, CSS, JavaScript

Serialization: Pickle

📂 Project Structure

 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>

⚙️ How It Works

    - Each disease has a separately trained ML model.

    - 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.

    ▶️ Run Locally

    pip install -r requirements.txt <br>
    python app.py <br>
    
    

    Open http://127.0.0.1:5000/ in your browser.

    🧠 Key Learnings

    - Maintaining feature consistency between training and inference
    • Handling categorical encoding in production ML systems

    • Debugging real-world ML deployment issues

    • Designing modular and scalable backend architecture

    📌 Future Improvements

    • REST API endpoints

    • Authentication & user history

    • Model monitoring & retraining pipeline

    • Dockerized deployment

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published