Dedicated REST API for AI model inference — processing real-time biometric data to deliver risk predictions for diabetes complications.
Repository · Report Bug · Research Paper
dabetai is a comprehensive preventive ecosystem for diabetes that predicts complications like retinopathy, nephropathy, neuropathy, and diabetic foot before they become irreversible.
This repository contains the AI Inference API — a dedicated FastAPI service that exposes trained machine learning models through REST endpoints for real-time risk prediction of:
- Diabetic Retinopathy
- Diabetic Nephropathy
- Diabetic Neuropathy
- Diabetic Foot
| Component | Repository | Stack |
|---|---|---|
| AI Inference API (this) | dabetai-org/ai-api | FastAPI, Python 3.11, MongoDB |
| Mobile App | dabetai-org/mobile-app | React Native 0.79, Expo 53, Tailwind CSS |
| Web Portal | dabetai-org/web-app | Angular 19, Tailwind CSS |
| Core API | dabetai-org/api | NestJS 11, PostgreSQL, Prisma |
| AI Models | dabetai-org/ai-models | Python, scikit-learn, XGBoost, PyTorch |
| Landing | dabetai-org/landing | Astro, Tailwind CSS |
- Fast Predictions — REST endpoints for real-time risk scoring
- Multiple Models — scikit-learn and PyTorch based predictions
- Complication Coverage — Retinopathy, Nephropathy, Neuropathy, Diabetic Foot
- JSON Responses — Risk metrics and probability scores
- Model Validation — Endpoints for testing and validation
- Python 3.11+
- pip
git clone https://github.com/dabetai-org/ai-api.git
cd ai-api
python -m venv env
source env/bin/activate # Linux/macOS
pip install -r requirements.txtRun the server:
uvicorn main:app --reloadThe API will be available at http://localhost:8000
┌──────────────────────────────────────────────┐
│ AI Inference API │
│ FastAPI │
│ │
│ ┌─────────┐ ┌─────────┐ ┌──────────────┐ │
│ │ Risk │ │ Model │ │ Health │ │
│ │ Predict │ │ Loader │ │ Check │ │
│ └────┬────┘ └────┬────┘ └──────┬───────┘ │
│ │ │ │ │
│ ┌────▼────────────▼───────────────▼──────┐ │
│ │ ML Model Registry │ │
│ │ scikit-learn / PyTorch / XGBoost │ │
│ └────────────────┬───────────────────────┘ │
└───────────────────┼─────────────────────────┘
│ Internal
┌─────────┴─────────┐
▼ ▼
┌──────────────┐ ┌──────────────┐
│ MongoDB │ │ Core API │
│ (Features) │ │ (NestJS) │
└──────────────┘ └──────────────┘
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/predict/retinopathy |
Retinopathy risk prediction |
| POST | /api/v1/predict/nephropathy |
Nephropathy risk prediction |
| POST | /api/v1/predict/neuropathy |
Neuropathy risk prediction |
| POST | /api/v1/predict/diabetic-foot |
Diabetic foot risk prediction |
| GET | /health |
Health check |
Please read CONTRIBUTING.md for branch naming, commit conventions, and PR workflow.
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.
Authors:
- Cardenas Cabal Fermín
- Ortiz Pérez Alejandro — alex03ortizperez@gmail.com
- Serrano Puertos Jorge Christian — christian.serrano.puertos@gmail.com
Advisors:
- Guarneros Nolasco Luis Rolando
- Cruz Ramos Nancy Aracely
Academic Support:
- Universidad Tecnológica del Centro de Veracruz