Logo Lanfrica

Muthaka-Frank/SHAMBA-SMART-BOT

Domaine:

natural language processingagriculture

Type de record:

software
Créateur:
Mut
HĂŽte:
# đŸŒ± Shamba-Smart — Voice Assistant for Kenyan Farmers A WhatsApp-linked voice bot that detects Swahili or Kikuyu automatically, retrieves agricultural advice from a RAG knowledge base, and replies with expert voice responses. --- ## 📁 Project Structure ``` MSHAURI-WA-WAKULIMA-BOT/ ├── BACKEND/ │ ├── app.py ← Flask webhook server │ ├── requirements.txt ← Python dependencies │ ├── .env.example ← Config template │ ├── asr/ │ │ ├── kikuyu_asr.py ← Kikuyu ASR (HuggingFace) │ │ ├── swahili_asr.py ← Swahili ASR (HuggingFace) │ │ └── language_detector.py← Cascading ASR — picks best model │ ├── services/ │ │ ├── intent_router.py ← Groq LLM: classify query intent │ │ ├── crop_advisor.py ← RAG-powered crop diagnosis │ │ ├── rag_indexer.py ← One-time indexer for knowledge base │ │ ├── market_prices.py ← Marigiti & Wakulima prices │ │ ├── weather.py ← Open-Meteo 3-day forecast │ │ ├── tts.py ← gTTS text-to-speech │ │ └── audio_utils.py ← OGG→WAV conversion │ ├── database/ │ │ └── db.py ← SQLAlchemy ORM + helpers │ └── tests/ │ └── test_shamba_smart.py← Unit tests │ ├── DATABASE/ │ ├── init_db.py ← Create SQLite schema │ ├── knowledge_base/ │ │ ├── kalro_crop_diseases.txt ← Crop disease guide │ │ ├── soil_management.txt ← Fertilizers & soil │ │ ├── pest_control.txt ← IPM pest guide │ │ ├── seasonal_calendar.txt ← Planting calendar by region │ │ └── market_prices.json ← Commodity price data │ └── chroma_store/ ← Created by rag_indexer.py │ └── FRONTEND/ ← Future admin dashboard ``` --- ## ⚡ Quick Start ### 1. Install Dependencies ```powershell cd MSHAURI-WA-WAKULIMA-BOT\BACKEND ..\ukulima-env\Scripts\Activate.ps1 pip install -r requirements.txt ``` ### 2. Configure Environment ```powershell Copy-Item .env.example .env #