Logo Lanfrica

Eddy-Emmanuel/Naija-Agro-Chat

Domaine:

natural language processingagriculture

Type de record:

software
Créateur:
Edd
Hôte:
# Naija‑Agro‑Chat An AI‑powered conversational assistant tailored for Nigerian agriculture. This project integrates speech‑to‑text, text generation, retrieval over domain documents, and text‑to‑speech to deliver an interactive experience via a Streamlit frontend. --- ## 📌 Features - **Speech‑to‑Text (STT)** for capturing user queries verbally. - **Text Generation** using an LLM to answer agricultural questions (passes the current date so the model can reason about time-sensitive items). - **Agentic reasoning (tools + retrieval)**: an optional LangChain agent decides whether to answer directly or call tools like the knowledge base (FAISS) and a web search. - **Conversation memory**: chat history is stored in the session and included in prompts for better follow‑ups. - **Multilingual support**: detects query language, translates non‑English queries for retrieval, and keeps answers in the user’s language. - **Safety checks and moderation** to filter inappropriate or unsafe inputs. - **Text‑to‑Speech (TTS)** to read responses aloud. - **Streamlit UI** for web‑based interaction. --- ## 📁 Repository Structure ``` . ├── app/ │ ├── streamlit_app.py # entry point for the Streamlit front end │ ├── agent/ # core AI “agent” modules │ │ ├── config.py # configuration/constants │ │ ├── generation.py # LLM prompt building & text generation │ │ ├── ingestion.py # document ingestion helpers │ │ ├── pipeline.py # orchestration of retrieval & generation │ │ ├── retrieval.py # FAISS index search logic │ │ ├── safety.py # input/output safety checks │ │ ├── stt.py # speech‑to‑text helper │ │ ├── tts.py # text‑to‑speech helper │ │ └── __init__.py │ └── agent/… # other supporting modules ├── config/ │ └── settings.py # environment/configuration settings ├── docs/ # add …