Skip to content

dabetai-org/ai-api

dabetai — AI Inference API

Python FastAPI scikit-learn PyTorch MongoDB

Dedicated REST API for AI model inference — processing real-time biometric data to deliver risk predictions for diabetes complications.

Repository · Report Bug · Research Paper

🇬🇧 English · 🇪🇸 Español


About dabetai

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

Ecosystem

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

Features

  • 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

Quick Start

Prerequisites

  • Python 3.11+
  • pip

Setup

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.txt

Run the server:

uvicorn main:app --reload

The API will be available at http://localhost:8000

Architecture

┌──────────────────────────────────────────────┐
│            AI Inference API                   │
│               FastAPI                         │
│                                               │
│  ┌─────────┐  ┌─────────┐  ┌──────────────┐ │
│  │  Risk   │  │  Model  │  │  Health      │ │
│  │ Predict │  │  Loader │  │  Check       │ │
│  └────┬────┘  └────┬────┘  └──────┬───────┘ │
│       │            │               │         │
│  ┌────▼────────────▼───────────────▼──────┐  │
│  │         ML Model Registry              │  │
│  │    scikit-learn / PyTorch / XGBoost    │  │
│  └────────────────┬───────────────────────┘  │
└───────────────────┼─────────────────────────┘
                    │ Internal
          ┌─────────┴─────────┐
          ▼                   ▼
┌──────────────┐    ┌──────────────┐
│  MongoDB     │    │  Core API    │
│  (Features)  │    │  (NestJS)    │
└──────────────┘    └──────────────┘

API Endpoints

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

Contributing

Please read CONTRIBUTING.md for branch naming, commit conventions, and PR workflow.

License

This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.

Acknowledgments

Authors:

Advisors:

  • Guarneros Nolasco Luis Rolando
  • Cruz Ramos Nancy Aracely

Academic Support:

  • Universidad Tecnológica del Centro de Veracruz

About

AI inference API for predicting risk of diabetic complications using machine learning models (FastAPI, Python, scikit-learn, PyTorch)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages