Diabetes Prediction Web App

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

  1. Model Training (Offline):
    • Dataset used: PIMA Indian Diabetes Dataset.
    • Preprocessed data and trained a classifier using Scikit-learn.
    • Model saved using pickle.
  2. 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).
  3. 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

Prediction Output

Future Enhancements

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