Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

A Flask web app that predicts the risk of diabetes based on user input using a trained machine learning model. Built with scikit-learn, pandas, and HTML/CSS. Simple UI, real-time predictions, and easy to deploy. Ideal for learning ML model deployment in web applications.

License

Notifications You must be signed in to change notification settings

GxAniket/diabetes-prediction-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 Diabetes Prediction App β€” Flask ML Web Application

Typing animation


πŸ“¦ Overview

Diabetes Prediction App is a web application built with Flask that predicts the likelihood of diabetes based on user health input data. The ML model is trained using the popular Pima Indians Diabetes Dataset and deployed via a Flask server with a clean and responsive user interface.

⚠️ Note: This project is for educational purposes only. It does not replace professional medical advice or diagnosis.


✨ Features

  • 🧠 Predict diabetes risk using ML
  • πŸ“‹ User-friendly web form for data input
  • βš–οΈ Data pre-processing and scaling
  • ⚑ Real-time predictions via trained model
  • 🎨 Responsive frontend using HTML/CSS
  • πŸ“‚ Easy-to-understand project structure

βš™οΈ Tech Stack

Layer Tools Used
Frontend HTML5, CSS3
Backend Python (Flask)
ML Model scikit-learn, pandas, joblib
Dataset diabetes.csv
Tools VS Code, Git

πŸ—‚οΈ Project Structure

diabetes-prediction-app/
β”œβ”€β”€ templates/
β”‚   └── index.html          # Web UI
β”œβ”€β”€ diabetes.csv            # Dataset
β”œβ”€β”€ model.pkl               # Trained ML model
β”œβ”€β”€ scaler.pkl              # Scaler object
β”œβ”€β”€ train_model.py          # Model training script
β”œβ”€β”€ app.py                  # Flask backend app
β”œβ”€β”€ Screenshot.png          # Demo screenshot
└── README.md

πŸ“Έ Screenshot 1

Screenshot 2025-08-02 133031


πŸ“Έ Screenshot 2

Screenshot 2025-08-02 143118


πŸ“Έ Screenshot 3

Screenshot 2025-08-02 143247


πŸ“Έ Screenshot 4 (After Updating the Frontend Background)

image


▢️ How to Run Locally

  1. Clone the Repository
    git clone https://github.com/GxAniket/diabetes-prediction-app.git
    cd diabetes-prediction-app
  2. Install Dependencies
  • pip install -r requirements.txt
  1. Train the Model (Optional)
  • python train_model.py
  1. Run the App
  • python app.py
  1. Open in Browser

🧠 Learnings & Goals

  • This project helped me:

  • Understand end-to-end ML model deployment

  • Build Flask-based data apps

  • Use scikit-learn for model training and scaling

  • Design clean and responsive HTML interfaces

  • Learn the structure of real-world Python apps


πŸš€ Future Enhancements

  • πŸ“Š Add result visualization (charts/graphs)
  • πŸ§ͺ Improve model accuracy with better preprocessing
  • ☁️ Deploy on Render, Railway, or Heroku
  • πŸ›‘οΈ Add input validation and error handling

🧾 License

This project is for learning purposes only. Feel free to use, modify, and share with proper credit. Not intended for medical or commercial use.


πŸ™Œ Author

  • Made with ❀️ by Aniket Sundriyal

About

A Flask web app that predicts the risk of diabetes based on user input using a trained machine learning model. Built with scikit-learn, pandas, and HTML/CSS. Simple UI, real-time predictions, and easy to deploy. Ideal for learning ML model deployment in web applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published