Skip to content

About

🩺 Diabetes Prediction Web App built with Streamlit & Machine Learning β€” features a login system, interactive health data form, and real-time risk prediction with auto-computed model performance metrics using the Pima Indians Diabetes Dataset.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🩺 Diabetes Prediction Web App

A machine learning-based web application for predicting diabetes risk using Streamlit. This application provides an interactive interface for users to input health parameters and receive instant diabetes risk predictions with visual feedback.

✨ Features

  • User Authentication: Secure login system with session management
  • Diabetes Prediction: ML model predicts diabetes risk based on health parameters
  • Visual Analytics: Probability visualization with bar charts
  • Health Recommendations: Personalized precautions for diabetes positive cases
  • User-Friendly Interface: Clean and intuitive design with responsive layout

πŸ› οΈ Tech Stack

  • Frontend: Streamlit
  • Backend: Python
  • Machine Learning: Scikit-learn (Random Forest Classifier)
  • Data Processing: Pandas, NumPy
  • Visualization: Matplotlib
  • Deployment: Streamlit Cloud / Heroku / AWS

πŸ“Š Input Parameters

Parameter Range Description
Pregnancies 0-20 Number of pregnancies
Glucose Level 0-200 Plasma glucose concentration
Blood Pressure 0-140 Diastolic blood pressure
Skin Thickness 0-100 Triceps skin fold thickness
Insulin Level 0-900 2-Hour serum insulin
BMI 0-70 Body Mass Index
Diabetes Pedigree Function 0-2.5 Diabetes family history score
Age 0-120 Age in years

πŸš€ Installation & Setup

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Step 1: Clone the Repository

git clone https://github.com/yourusername/diabetes-prediction-app.git
cd diabetes-prediction-app
Step 2: Install Dependencies
bash
pip install -r requirements.txt
Step 3: Run the Application
bash
streamlit run app.py
Step 4: Access the App
Open your browser and navigate to:

text
http://localhost:8501
πŸ“Έ Screenshots
Login Page
https://screenshots/login.png

Prediction Form
https://screenshots/form.png

Result Page
https://screenshots/result.png

🎯 How It Works
Login: Users authenticate with their credentials

Input: Enter patient health parameters

Predict: Click the predict button

Results: View prediction results with probability visualization

Recommendations: Get health recommendations if diabetes positive

πŸ“ Project Structure
text
diabetes-prediction-app/
β”œβ”€β”€ app.py                 # Main application
β”œβ”€β”€ diabetes_model.pkl     # Trained ML model
β”œβ”€β”€ requirements.txt       # Dependencies
β”œβ”€β”€ README.md             # Documentation
└── screenshots/          # Screenshots
πŸ€– Machine Learning Model
Algorithm: Random Forest Classifier

Dataset: Pima Indians Diabetes Database

Features: 8 medical parameters

Performance: 78% accuracy on test data

πŸ”§ Configuration
Model File
Ensure diabetes_model.pkl is in the root directory. The model should be trained with the same features as the input form.

Customization
Modify MODEL_PATH variable in app.py to change model location

Adjust slider ranges in the form as needed

Customize sidebar content in the app


πŸ‘¨β€πŸ’» Author
Habib Zahid

Email: habibzahid203@gmail.com

Service: Machine Learning & AI Solutions

πŸ“„ License
This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

Streamlit for the amazing framework

Scikit-learn community

🀝 Contributing
Fork the repository

Create your feature branch (git checkout -b feature/AmazingFeature)

Commit your changes (git commit -m 'Add some AmazingFeature')

Push to the branch (git push origin feature/AmazingFeature)

Open a Pull Request

πŸ“ž Contact
For any queries or suggestions, please reach out to:

Email: habibzahid203@gmail.com

GitHub: 

Made with ❀️ by Habib Zahid

About

🩺 Diabetes Prediction Web App built with Streamlit & Machine Learning β€” features a login system, interactive health data form, and real-time risk prediction with auto-computed model performance metrics using the Pima Indians Diabetes Dataset.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages