DiaScore is a full-stack application for diabetes risk estimation. It combines:
- FastAPI API layer
- PyTorch model inference
- scikit-learn preprocessing (KNN imputer and feature scaling)
- SQLite persistence
- React + Vite frontend
demo.mp4
A full demo walkthrough showing the main flow: medical questionnaire, family interview, prediction result, and history management.
The main landing page shows the medical questionnaire on the left and the family interview card on the right. This is the entry point for entering clinical values before sending a prediction.
The family interview screen lets the user add relatives, specify early onset diabetes, and mark associated conditions such as obesity, hypertension, or heart disease.
The prediction result view displays the final risk percentage, risk category, and follow-up recommendations in a dedicated summary panel.
The history screen lists previous predictions, highlights the stored clinical values, and provides export and deletion actions for managing saved records.
The confirmation modal appears before deleting a single record or clearing history. It prevents accidental removal of stored predictions.
DiaScore is not only a web API. The core backend logic includes the ML model and preprocessing pipeline. The project is built as an end-to-end system: data preparation, model training, inference, API integration, and UI for patient-facing prediction history.
- Predict diabetes risk from medical questionnaire values.
- Impute missing values before inference.
- Store prediction history in SQLite.
- Display history in the frontend and export results to CSV.
- Support single-record deletion and full history cleanup.
The project should be run through Docker Compose (not by starting frontend and backend separately).
- Docker
- Docker Compose plugin
docker compose builddocker compose upOr build and start in one command:
docker compose up --build- Frontend: http://localhost:3000
- API: http://localhost:8000
docker compose downDiaScore uses a binary classification neural network implemented in PyTorch and trained on the Pima Indians Diabetes dataset. Before inference, missing clinical values are imputed (KNN imputer), then scaled with StandardScaler.
Model details, intended use, metrics and trade-offs are documented in:
Related ML notebooks:
api/- FastAPI app and endpoint schemasdatabase/- SQLAlchemy models, CRUD, preprocessing, database scriptsfrontend/- React and Vite user interfaceml/- model training, evaluation and inference codedata/- dataset and split utilitiesdocs/- project documentation, including model card
- Patrycja Piasecka (PatiPiasecka)
- Patrycja Zborowska (loschrix)