Skip to content

ali-faraz-py/DiabetesDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

🩺 Diabetes Risk Diagnostic Tool

A professional, machine learning-powered web application built with Python and Streamlit. This tool uses a Random Forest Classifier trained on the Pima Indians Diabetes Database to predict the probability of diabetes based on clinical health metrics.


πŸš€ Live Demo

Click here to try the Live App


πŸ“Ί Demo Preview

Diabetes Detector Demo


✨ Features

  • Interactive Sidebar: Adjustable sliders and input fields for real-time data entry.
  • AI-Powered Predictions: Instant probability scoring with clear "High Risk" or "Low Risk" feedback.
  • Data Visualization: Interactive donut charts powered by Plotly showing training data distribution.
  • Downloadable Reports: Generate and download a personalized .txt diagnostic report of the results.
  • Model Transparency: View accuracy metrics and model evaluation details (Confusion Matrix) directly in-app.

πŸ› οΈ Tech Stack

  • Language: Python 3.13
  • Framework: Streamlit (Web UI)
  • Machine Learning: Scikit-learn (Random Forest)
  • Data Handling: Pandas & NumPy
  • Visualization: Plotly Express
  • Deployment: Streamlit Community Cloud

πŸš€ Installation & Local Setup

  1. Clone the repository:
    git clone [https://github.com/ali-faraz-py/DiabetesDetector.git](https://github.com/ali-faraz-py/DiabetesDetector.git)
    cd DiabetesDetector
    
    
  2. Install dependencies:
    pip install -r requirements.txt
    
    
  3. Run the application:
    streamlit run app.py
    

πŸ“‚ Project Structure

DiabetesDetector/
β”œβ”€β”€ app.py              # Streamlit Web Application logic
β”œβ”€β”€ model.pkl           # Pre-trained Random Forest Model
β”œβ”€β”€ explore.ipynb       # Data analysis & model training notebook
β”œβ”€β”€ requirements.txt    # Project dependencies
β”œβ”€β”€ .gitattributes      # GitHub language customization
└── assets/             # Images & Demo GIFs

🧠 Model Insights

The model achieves an 80.5% accuracy rate. Below is the Confusion Matrix showing how the model performs on unseen data:

Confusion Matrix

The matrix shows our model is particularly strong at identifying healthy patients, with a focus on reducing false negatives.


πŸ‘€ Author

Syed Ali Faraz - GitHub Profile

If you found this tool insightful, please give the repository a ⭐!

About

πŸ₯ Diabetes Detector: A professional ML diagnostic tool using a Random Forest Classifier to predict diabetes risk. Features real-time probability scoring, interactive Plotly visualizations, and downloadable clinical reports. Built with Python & Streamlit. 🩺

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages