DiaDetect is a sleek and functional web application designed to help users assess their risk of diabetes based on health metrics. Powered by Machine Learning and a simple, user-friendly Flask interface, it leverages a Support Vector Machine (SVM) model to predict diabetes likelihood. Just fill in your basic health parameters, and DiaDetect will analyze your risk of diabetes in an instant.
- 🧮 Machine Learning: Trained Support Vector Machine (SVM) model for accurate predictions.
- 🧑⚕️ Health Metrics: Input health data like BMI, glucose level, and more to assess diabetes risk.
- ⚡ Fast and Lightweight: Built using Flask, the app is fast and responsive.
- 🎨 Beautiful UI: A modern, mobile-responsive design powered by Bootstrap 4.
- 🔍 Explainability: Simple results that are easy to interpret for users with or without medical knowledge.
Technology | Description |
---|---|
Python | Core programming language for backend logic and machine learning. |
Flask | Lightweight web framework used to serve the application. |
Scikit-learn | Python library for implementing the Support Vector Machine (SVM). |
Bootstrap 4 | Frontend framework for responsive design and UI components. |
Joblib | Used for saving and loading the trained machine learning model. |
HTML/CSS | Structure and design of the web interface. |
The diabetes prediction model is built using a Support Vector Machine (SVM). The following health metrics are used as features for prediction:
- Pregnancies: Number of pregnancies.
- Glucose: Plasma glucose concentration.
- Blood Pressure: Diastolic blood pressure in mm Hg.
- Skin Thickness: Triceps skinfold thickness in mm.
- Insulin: 2-Hour serum insulin level (mu U/ml).
- BMI: Body mass index (weight in kg/(height in m)^2).
- Diabetes Pedigree Function: A function that scores the likelihood of diabetes based on family history.
- Age: The age of the individual.
The model was trained using the Pima Indians Diabetes Database from the UCI Machine Learning Repository.
DiaDetect features a clean and modern interface, designed with Bootstrap 4. It’s mobile-friendly, ensuring users can interact with the app on any device.
- The form is straightforward, with health inputs clearly labeled.
- The prediction result is displayed in a friendly and informative format.
-
Clone the repository:
git clone https://github.com/vishomallaoli/dia-detect.git cd dia-detect
-
Set up a virtual environment:
python -m venv myenv source myenv/bin/activate # On Windows use `myenv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
flask run
-
Open your browser and go to
http://127.0.0.1:5000/
.
- Open the DiaDetect web interface.
- Enter your health metrics such as Glucose, BMI, and Age.
- Hit the "Predict" button.
- The app will instantly display whether you're at risk for diabetes based on the input.
📁 dia-detect/
│
├── 📁 templates/ # HTML templates
│ └── index.html # Main page for user input and result
│
├── app.py # Main Flask application
├── svm_model_8_features.joblib # Pre-trained SVM model file
├── requirements.txt # Python dependencies
├── README.md # Project README (this file)
└── .gitignore # Ignored files and directories
- Visho Malla Oli - Project Lead & Developer
GitHub Profile
This project is licensed under the MIT License - see the LICENSE file for details.
- More Features: Incorporate additional health metrics to improve accuracy.
- Graphical Output: Display risk results with visual aids like charts or graphs.
- User Accounts: Allow users to save and track their predictions over time.
If you found this project helpful, consider giving it a ⭐️ on GitHub!
### Key Components:
1. **Fancy Design Elements**:
- Badge icons for technologies used, model type, and license.
- Eye-catching section titles with emojis.
2. **Functional and Descriptive**:
- Clearly explains the purpose and features of the project.
- Technologies are broken down and explained in a concise table.
- Provides instructions on installation, usage, and future enhancements.
3. **Visual and User-Friendly**:
- Includes a section for future improvements, which encourages contributions and feedback.
- Describes each component of the project, from technologies used to how the app works.