CoolFace
Apppublic

ziko-ahmed/saheli

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

πŸ›‘οΈ Saheli

WhatsApp-first AI triage system for rural healthcare, powered by Gemma 4.

Saheli lets any patient describe their symptoms via WhatsApp β€” in text, voice, or photo β€” and receives an intelligent triage response in their language. Behind the scenes, Saheli silently aggregates anonymous symptom data across thousands of conversations to detect disease outbreaks 48–72 hours before official surveillance.

Kaggle Gemma 4 Good Hackathon 2026 Tracks: Health & Sciences Β· Digital Equity & Inclusivity

✨ Features

  • β€”πŸ—£ Multilingual triage β€” Hindi, English, Bengali, Tamil (Gemma 4 supports 140+ languages)
  • β€”πŸ“± WhatsApp-first β€” Zero learning curve, works on basic phones
  • β€”πŸŽ€ Multimodal input β€” Text, voice notes (Whisper), photos of rashes/wounds
  • β€”πŸ§  Gemma 4 intelligence β€” Fine-tuned 26B MoE model for medical symptom analysis
  • β€”βš‘ 3-tier severity scoring β€” Mild β†’ self-care, Moderate β†’ ASHA alert, Emergency β†’ all hands
  • β€”πŸ”¬ Outbreak detection β€” DBSCAN geo-temporal clustering for epidemic early warning
  • β€”πŸ“Š Live dashboard β€” Heatmap, alert feed, symptom trends, severity distribution
  • β€”πŸ”’ Privacy-first β€” No PII stored, 6-hour time bucketing, k-anonymity

πŸ— Architecture

Patient (WhatsApp)
       ↓
 Meta Cloud API webhook
       ↓
 FastAPI Backend
       ↓
 Gemma 4 (26B A4B MoE, fine-tuned)
 β†’ Language detection β†’ Symptom extraction
 β†’ Severity scoring β†’ Differential diagnosis
 β†’ Explainable reasoning (XAI)
       ↓
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Mild (1-4)  β”‚ Mod (5-7)   β”‚ Emergency (8-10)
 β”‚ Self-care   β”‚ + ASHA alertβ”‚ + All services alerted
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       ↓
 Anonymous telemetry β†’ DBSCAN clustering β†’ Outbreak alerts

πŸš€ Quick Start

Prerequisites

  • β€”Python 3.11+
  • β€”Docker & Docker Compose (for PostgreSQL + TimescaleDB)
  • β€”NVIDIA GPU with 16GB+ VRAM (for Gemma 4; or use mock mode)

Setup

bash
# Clone and enter project
cd saheli

# Copy environment file
cp .env.example .env
# Edit .env with your WhatsApp API credentials

# Start database
docker compose up -d db

# Install Python dependencies
pip install -r requirements.txt

# Run the server
uvicorn app.main:app --reload

Endpoints

EndpointDescription
GET /Health check
GET /webhook?hub.mode=...WhatsApp verification
POST /webhookReceive WhatsApp messages
POST /api/triageDirect triage API (testing)
POST /api/triage/demoDemo with sample Hindi symptoms
GET /api/dashboard/statsDashboard statistics
POST /api/dashboard/simulateInject fake outbreak signals
GET /dashboardOutbreak detection web dashboard

πŸ“ Project Structure

saheli/
β”œβ”€β”€ app/                    # FastAPI backend
β”‚   β”œβ”€β”€ main.py             # Application entry point
β”‚   β”œβ”€β”€ config.py           # Settings (Pydantic)
β”‚   β”œβ”€β”€ models/             # Pydantic schemas
β”‚   β”œβ”€β”€ routers/            # API endpoints
β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”œβ”€β”€ db/                 # Database layer
β”‚   └── prompts/            # Gemma 4 system prompts
β”œβ”€β”€ dashboard/              # Outbreak web dashboard
β”œβ”€β”€ diagrams/               # Architecture SVG diagrams
β”œβ”€β”€ notebooks/              # Kaggle notebooks
β”œβ”€β”€ data/                   # Datasets
β”œβ”€β”€ docs/                   # Competition deliverables
└── tests/                  # Test suite

🧬 Tech Stack

ComponentTechnology
LLMGemma 4 26B A4B MoE (4-bit quantised)
BackendFastAPI + Python 3.11
DatabasePostgreSQL 16 + TimescaleDB
Voice STTfaster-whisper
Clusteringscikit-learn DBSCAN
WhatsAppMeta Cloud API
DashboardVanilla HTML/CSS/JS + Leaflet + Chart.js

πŸ“œ License

Apache 2.0 β€” same as Gemma 4.