Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ PredictiBetes โ€” AI-Powered Diabetes Prediction & Clinical Analytics Platform

Python FastAPI Scikit-Learn Bootstrap Plotly SQLite

๐Ÿš€ Live Demo: https://predictibetes-ai.onrender.com/

โญ GitHub Repository: https://github.com/Ashwitha-Ramesh/PredictiBetes-AI


๐Ÿ“Œ Overview

PredictiBetes is a recruiter-ready end-to-end Machine Learning web application that predicts diabetes risk using multiple supervised learning algorithms while providing clinical analytics, explainable AI insights, interactive dashboards, and prediction history management.

Unlike traditional ML notebooks, PredictiBetes demonstrates the complete production workflowโ€”from data preprocessing and model training to deployment with FastAPI and cloud hosting.


๐ŸŒŸ Features

๐Ÿง  Machine Learning

  • Logistic Regression
  • Random Forest
  • Decision Tree
  • Support Vector Machine (SVM)
  • K-Nearest Neighbors (KNN)
  • Gaussian Naive Bayes

๐Ÿ“Š Interactive Analytics

  • Interactive Plotly Dashboard
  • Correlation Heatmaps
  • Feature Distributions
  • Boxplots
  • Scatter Plots
  • Clinical Statistics
  • Dataset Exploration

๐Ÿค– Explainable AI (XAI)

Each prediction includes

  • Risk Probability
  • Confidence Score
  • Top Positive Risk Factors
  • Protective Factors
  • Clinical Interpretation
  • Personalized Health Recommendations

๐Ÿ‘จโ€โš•๏ธ Prediction System

โœ” Single Patient Prediction

โœ” Batch CSV Prediction

โœ” Real-time Risk Classification

โœ” Confidence Estimation

โœ” Feature Scaling

โœ” Missing Value Handling


๐Ÿ—„ Prediction History

  • SQLite Database
  • Search Predictions
  • Filter Records
  • Delete Records
  • CSV Export

๐ŸŽจ Modern UI

  • Glassmorphism Design
  • Bootstrap 5
  • Responsive Layout
  • Interactive Charts
  • Dark Theme
  • Animated Dashboard

โ˜ Deployment

Successfully deployed on

Render

Production Ready

No Docker Required


๐Ÿ“ท Application Preview

๐Ÿ“ท Application Preview

๐Ÿ  Home Page

Home Page

๐Ÿฉบ Diabetes Prediction

Prediction Page

๐Ÿ“Š Interactive Dashboard

Dashboard

๐Ÿ“ˆ Exploratory Data Analysis (EDA)

EDA

๐Ÿค– Machine Learning Model Comparison

Models Comparison

๐Ÿ—‚ Prediction History

Prediction History ```

๐Ÿ— Project Architecture

PredictiBetes-AI
โ”‚
โ”œโ”€โ”€ app
โ”‚   โ”œโ”€โ”€ routers
โ”‚   โ”‚     โ”œโ”€โ”€ predict.py
โ”‚   โ”‚     โ”œโ”€โ”€ analytics.py
โ”‚   โ”‚     โ””โ”€โ”€ history.py
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ services
โ”‚   โ”‚     โ”œโ”€โ”€ ml_service.py
โ”‚   โ”‚     โ””โ”€โ”€ eda_service.py
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ static
โ”‚   โ”‚     โ”œโ”€โ”€ css
โ”‚   โ”‚     โ”œโ”€โ”€ js
โ”‚   โ”‚     โ””โ”€โ”€ images
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ templates
โ”‚   โ”‚     โ”œโ”€โ”€ base.html
โ”‚   โ”‚     โ”œโ”€โ”€ index.html
โ”‚   โ”‚     โ”œโ”€โ”€ predict.html
โ”‚   โ”‚     โ”œโ”€โ”€ dashboard.html
โ”‚   โ”‚     โ”œโ”€โ”€ eda.html
โ”‚   โ”‚     โ”œโ”€โ”€ models.html
โ”‚   โ”‚     โ””โ”€โ”€ history.html
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ database.py
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ ml_model.py
โ”‚   โ”œโ”€โ”€ models.py
โ”‚   โ”œโ”€โ”€ schemas.py
โ”‚   โ”œโ”€โ”€ train_model.py
โ”‚   โ””โ”€โ”€ utils.py
โ”‚
โ”œโ”€โ”€ dataset
โ”‚     โ””โ”€โ”€ diabetes.csv
โ”‚
โ”œโ”€โ”€ model
โ”‚     โ”œโ”€โ”€ best_model.pkl
โ”‚     โ””โ”€โ”€ metrics.json
โ”‚
โ”œโ”€โ”€ notebooks
โ”‚
โ”œโ”€โ”€ screenshots
โ”‚
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ CHANGELOG.md
โ””โ”€โ”€ README.md

โš™ Technology Stack

Backend

  • FastAPI
  • Python
  • SQLAlchemy
  • Uvicorn
  • Pydantic

Machine Learning

  • Scikit-Learn
  • Pandas
  • NumPy
  • Joblib

Frontend

  • HTML5
  • Jinja2
  • Bootstrap 5
  • Vanilla JavaScript
  • Plotly.js

Database

SQLite


๐Ÿš€ Local Installation

Clone Repository

git clone https://github.com/Ashwitha-Ramesh/PredictiBetes-AI.git

cd PredictiBetes-AI

Create Virtual Environment

Windows

python -m venv venv

venv\Scripts\activate

Linux / macOS

python3 -m venv venv

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Train Models

python app/train_model.py

Run Application

uvicorn app.main:app --reload

Open

http://127.0.0.1:8000

๐ŸŒ Live Deployment

Live Website

https://predictibetes-ai.onrender.com/

Hosted using

  • Render
  • FastAPI
  • Uvicorn
  • SQLite

๐Ÿ“ˆ Machine Learning Workflow

Dataset

โ†“

Data Cleaning

โ†“

Feature Engineering

โ†“

Train/Test Split

โ†“

Model Training

โ†“

Model Evaluation

โ†“

Best Model Selection

โ†“

FastAPI Backend

โ†“

Interactive Dashboard

โ†“

Cloud Deployment

๐Ÿ“Š Model Comparison

Algorithm Evaluated
Logistic Regression โœ…
Random Forest โœ…
Decision Tree โœ…
Support Vector Machine โœ…
KNN โœ…
Gaussian Naive Bayes โœ…

๐Ÿ”ฎ Future Improvements

  • User Authentication
  • Doctor Dashboard
  • PDF Clinical Report
  • REST API Versioning
  • Docker Support
  • PostgreSQL Integration
  • SHAP Explainability
  • Deep Learning Models
  • CI/CD using GitHub Actions

๐Ÿ‘จโ€๐Ÿ’ป Developer

Ashwitha Ramesh

Computer Science Engineering Student

AI โ€ข Machine Learning โ€ข Data Analytics โ€ข Open Source


Connect with me

๐Ÿ“ง Email

๐Ÿ’ผ LinkedIn

https://www.linkedin.com/in/ashwitha-ramesh-0123ab315/

๐Ÿ™ GitHub

https://github.com/Ashwitha-Ramesh

โญ Support

If you found this project useful,

โญ Star the repository

๐Ÿด Fork the repository

๐Ÿ“ข Share it with others


๐Ÿ“œ License

Licensed under the MIT License.


Disclaimer: PredictiBetes is an educational Machine Learning project intended for demonstration, research, and portfolio purposes. It is not a substitute for professional medical diagnosis or treatment.

About

AI-powered Diabetes Prediction & Clinical Analytics Platform built with FastAPI, Scikit-learn, Plotly, SQLite and Bootstrap.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages