Skip to content

Repository files navigation

DoccyAI Banner

🩺 DoccyAI

Multimodal Medical Assistant for Preliminary Health Assessments

Because getting a first opinion shouldn't require a waiting room.

Flutter FastAPI scikit-learn Docker HuggingFace License: MIT


📖 Overview

DoccyAI is a cross-platform mobile application that acts as a preliminary health assessment companion. Users describe their symptoms through a conversational interface, and DoccyAI uses a trained ML model to suggest possible conditions — all without a single phone call to a clinic.

⚠️ Disclaimer: DoccyAI is designed for preliminary, informational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider.

The project bridges mobile-first UX (Flutter) with a Python ML backend (FastAPI + scikit-learn), packaged in Docker and deployed on HuggingFace Spaces.


✨ Features

  • 🔍 Symptom-based Disease Prediction — Logistic Regression model trained on curated symptom–disease datasets
  • 📱 Cross-platform Mobile App — Flutter frontend supporting Android & iOS from a single codebase
  • ⚡ REST API Backend — FastAPI backend with clean, auto-documented endpoints (/docs)
  • 🐳 Fully Containerised — Docker setup for consistent local and production environments
  • 🌐 Cloud Deployed — Live inference API hosted on HuggingFace Spaces
  • 🔄 CORS-Configured — Secure cross-origin handling between the Flutter app and API

🏗️ Architecture

┌─────────────────────────────────────────────────────────┐
│                    Flutter App (Dart)                   │
│         Cross-platform Mobile UI (Android / iOS)        │
└────────────────────────┬────────────────────────────────┘
                         │ HTTP REST (JSON)
                         ▼
┌─────────────────────────────────────────────────────────┐
│              FastAPI Backend (Python)                   │
│     /predict  →  Logistic Regression (.pkl model)       │
│     Auto-docs at /docs  |  CORS enabled                 │
└────────────────────────┬────────────────────────────────┘
                         │
            ┌────────────┴────────────┐
            ▼                         ▼
     🐳 Docker Container     🤗 HuggingFace Spaces
     (Local Dev / Prod)       (Live Deployment)

🧠 ML Model

Property Details
Algorithm Logistic Regression (scikit-learn)
Input Binary symptom vector
Output Predicted disease label + confidence
Serialisation .pkl (Git LFS tracked)
Library Version scikit-learn == 1.5.2 (pinned)

Why Logistic Regression? It's interpretable, fast at inference, and performs surprisingly well on structured symptom-disease datasets — a conscious choice of a model that a doctor could actually reason about, rather than a black-box neural net.


🚀 Getting Started

Prerequisites

  • Flutter SDK ≥ 3.x
  • Python 3.9+
  • Docker (optional, for containerised setup)
  • Git LFS (for .pkl model files)
git lfs install
git clone https://github.com/AsMetOP/DoccyAI.git
cd DoccyAI

🐍 Backend Setup (FastAPI)

cd backend

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Start the development server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

API will be live at http://localhost:8000 Interactive docs at http://localhost:8000/docs


🐳 Docker Setup

cd backend
docker build -t doccyai-backend .
docker run -p 8000:8000 doccyai-backend

📱 Flutter App Setup

cd frontend

# Fetch dependencies
flutter pub get

# Run on a connected device or emulator
flutter run

Update the API base URL in the app config to point to your local backend or the live HuggingFace endpoint.


📡 API Reference

POST /predict

Accepts a list of symptoms and returns the predicted condition.

Request Body:

{
  "symptoms": ["headache", "fever", "fatigue"]
}

Response:

{
  "prediction": "Influenza",
  "confidence": 0.87
}

📂 Project Structure

DoccyAI/
├── backend/
│   ├── main.py               # FastAPI app & CORS config
│   ├── model/
│   │   └── model.pkl         # Trained LR model (Git LFS)
│   ├── requirements.txt      # Pinned dependencies
│   └── Dockerfile
│
├── frontend/
│   ├── lib/
│   │   ├── main.dart         # App entry point
│   │   ├── screens/          # UI screens
│   │   └── services/         # API service layer
│   └── pubspec.yaml
│
└── README.md

👥 Team

Contributor Role
Asmet Sahoo ML Engineer — Model, FastAPI Backend, Docker, HuggingFace Deployment
Astha Upadhyay Database
Krish Agrawal Testing
Sneha Das Frontend Development

🛠️ Tech Stack

Layer Technology
Mobile Frontend Flutter / Dart
ML Backend FastAPI + scikit-learn
ML Model Logistic Regression
Containerisation Docker
Cloud Deployment HuggingFace Spaces
Version Control Git + Git LFS

🔮 Roadmap

  • Add multimodal input (image + symptom text)
  • Expand disease coverage with a richer dataset
  • Add explainability layer (SHAP values per prediction)
  • Integrate appointment booking / doctor referral
  • Offline inference with on-device model (TFLite / ONNX)

📄 License

This project is licensed under the MIT License.


Built with ❤️ by the DoccyAI team · KIIT University, Bhubaneswar

About

Multimodal Medical Assistant for Preliminary Health Assessment

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages