A Streamlit agriculture assistant that accepts questions in many languages, translates them to English, asks the LLM, and translates the final answer back to the user's language.
Open the deployed app here:
https://agrodocaiassist.streamlit.app/
- AI-powered farming question answering
- Multilingual question support with automatic language detection
- Answers in the user's selected or detected language
- Farmer-friendly detailed guidance with practical steps
- Crop disease, fertilizer, irrigation, weather, soil health, and farming scheme question support
- Optional crop image upload for user context
- Modern Streamlit dashboard UI
- Custom AGRO-DOC AI branding and logo
- OpenAI Responses API integration
- Streamlit Cloud deployment support with secure secrets
User asks in any language
|
translator.py detects/translates input to English
|
agents.py sends query to LLM
|
agents.py uses the real user prompt with the LLM
|
translator.py converts answer back to user language
|
app.py shows final response
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .envAdd your real API key to .env.
This version uses requests for the OpenAI API call to avoid dependency conflicts with googletrans.
streamlit run app.pyDeployed app:
https://agrodocaiassist.streamlit.app/
Use Streamlit Community Cloud:
- Push this repo to GitHub.
- Create a new Streamlit app from the GitHub repo.
- Set the main file path to
app.py. - Add these secrets in Streamlit Cloud:
OPENAI_API_KEY = "your_openai_api_key_here"
OPENAI_MODEL = "gpt-5.4-mini"
OPENAI_REASONING_EFFORT = "low"Do not commit .env.