Overview
This project is a machine learning-based web application that predicts whether a person is diabetic or not using medical input data. It uses a trained classification model served via a FastAPI backend.
Tech Stack Used
Python
Scikit-learn
FastAPI
Pydantic
Pickle
HTML/CSS/JS
Render
How It Works
-
Model Training (Offline):
- Dataset used: PIMA Indian Diabetes Dataset.
- Preprocessed data and trained a classifier using Scikit-learn.
- Model saved using pickle.
-
API Integration (FastAPI):
- Created a POST endpoint
/diabetes_prediction to accept medical data.
- The input is parsed using Pydantic's BaseModel.
- Data is converted into a format that the model understands.
- The trained model returns a prediction (diabetic or not diabetic).
-
Frontend:
- A simple HTML form collects user input.
- Sends the data to the FastAPI backend using fetch or axios.
- Displays prediction results to the user.
Input Parameters
- Pregnancies
- Glucose
- Blood Pressure
- Skin Thickness
- Insulin
- BMI
- Diabetes Pedigree Function
- Age
Prediction Output
- the person is diabetic
- the person is not diabetic
Future Enhancements
- Add user authentication & login.
- Store prediction history in a database.
website might not work as server is off now close Github and in repo run with
uvicorn Main:app --reload
note: install uvicorn and other required libraries from docker File