Sasya-AI-Backend / README.md
Neel2601's picture
Sasya AI: replace farmer-ai-backend with 4-model API + Gradio UI
041a776
|
Raw
History Blame Contribute Delete
1.38 kB
---
title: Sasya AI
emoji: 🌾
colorFrom: green
colorTo: yellow
sdk: docker
app_port: 7860
pinned: false
license: mit
short_description: Crop disease detection & farmer advisory for India
---
# Sasya AI
AI-powered crop disease detection and farmer advisory for Indian farmers.
- **Gradio UI** at `/` β€” try disease detection & chat in browser
- **REST API** at `/docs` β€” for Expo mobile & web frontend
## Models
| Component | Model |
|-----------|-------|
| Disease CNN | EfficientNet-V2-S (143 classes, 30 crops) |
| Speech | Whisper Small |
| Translation | NLLB-200 distilled 600M |
| Advisory | TinyLlama 1.1B + agricultural LoRA (RAG, no hallucination) |
## Mobile integration
```
EXPO_PUBLIC_API_URL=https://neel2601-sasya-ai.hf.space
```
## API Endpoints
- `GET /health`
- `POST /image-diagnosis` β€” `explain=true` for TinyLlama advisory
- `POST /chat` β€” KB retrieval β†’ TinyLlama rewrite
- `POST /chat-with-image`
- `POST /speech-to-text`
- `POST /voice-chat`
- `POST /translate`
- `POST /text-to-speech`
## Environment
| Variable | Default | Description |
|----------|---------|-------------|
| `HF_TOKEN` | β€” | For private model repos |
| `USE_WHISPER_FINETUNE` | `0` | Use local Whisper fine-tune |
| `ELEVENLABS_API_KEY` | β€” | Optional premium TTS |
Disease weights: [Neel2601/sasya-disease-v2](https://huggingface.co/Neel2601/sasya-disease-v2)