Offline AI diagnostics for health & agriculture in rural Africa, Gemma 3n on-device via LiteRT, zero cloud, zero connectivity required.
# ZinEdge — Offline AI Diagnostics for Africa
**ZinEdge** is an Android application embedding Google's Gemma 3n model (4B parameters, INT4, 1.9 GB) directly on-device via LiteRT, providing medical and agricultural diagnostics **100% offline** on low-end smartphones.
> Built for rural sub-Saharan Africa — no internet, no cloud, no data leaving the device.
---
## The Problem
In rural sub-Saharan Africa:
- **1 doctor per 10,000 inhabitants** in rural areas
- **600M+ people** with no reliable internet access
- **Smartphones** cost 80–150 USD (entry-level SoCs: MediaTek Helio, Snapdragon 4xx)
Existing AI health tools (GPT APIs, Gemini, Claude) require cloud connectivity. Static decision-tree apps lack natural language understanding. ZinEdge closes this gap.
---
## Features
| Module | Description |
|---|---|
| **Health Diagnosis** | Enter symptoms (fever, chills, cough…) + optional photo → AI produces probable diagnosis, confidence score, and locally-accessible treatment recommendations |
| **Crop Disease Detection** | Select crop (maize, tomato, groundnut, sorghum) + photo → AI identifies disease and proposes treatment adapted to locally available inputs |
| **Offline Chatbot** | Free-form medical/agricultural Q&A powered by Gemma 3n, fully offline |
| **History** | Consult past diagnoses with search and filters |
---
## Technical Stack
```
Model : Gemma 3n E4B-it INT4 (4.92 GB, .litertlm format)
Runtime : Google LiteRT (formerly TensorFlow Lite) via MediaPipe LlmInference API
Deployment : USB sideload → Android external app-specific storage (no Play Store needed)
Platform : Android 8.0+ (API 26+), optimized for NPU (Qualcomm, MediaTek)
UI : Jetpack Compose + Material 3
DI : Hilt
Local DB : Room
Language : Kotlin
```
---
## Model Deployment (Sideload via USB)
The model is **not included** in the APK (4.92 GB exceeds any reasonable app size). Deploy it via ADB:
```bash
# Connect phone via USB, enable ADB debugging
adb push gem …