AgroTalk is an AI-powered chatbot designed to assist users with agricultural queries. The system integrates advanced NLP models, image recognition, and weather APIs to provide insightful recommendations, field analysis, and weather forecasts to farmers and agricultural professionals.
- Chatbot Assistance: Uses OpenAI's GPT models to respond to user queries related to farming, crops, and soil conditions.
- Speech-to-Text Processing: Converts spoken queries into text using Google Cloud Speech-to-Text API.
- Image Recognition: Analyzes images using OpenAI's vision models to provide insights about crops, soil quality, and pests.
- Weather Forecasting: Fetches real-time weather data from OpenWeatherMap to assist farmers in decision-making.
- Multilingual Support: Translates queries and responses between English and Spanish using MarianMT models.
- Programming Language: Python
- APIs & Services:
- OpenAI GPT models for chatbot responses
- Google Cloud Speech-to-Text for voice input
- OpenAI Vision for image analysis
- OpenWeatherMap API for weather forecasting
- Libraries Used:
- Flask (for the web API)
- Transformers (for language translation)
- PIL (for image handling)
- Requests (for API calls)
Ensure you have Python installed (recommended: Python 3.8+). Install dependencies using:
pip install -r requirements.txtBefore running the project, set up the required API keys as environment variables:
export ACCUWEATHER_API_KEY="your_accuweather_api_key"
export AGROTALK_API_KEY="your_agrotalk_api_key"
export AZURE_OPENAI_API_KEY="your_azure_openai_api_key"
export AZURE_OPENAI_ENDPOINT="your_azure_openai_endpoint"To start the application, run:
python app.pycurl -X POST "http://localhost:5000/chat" -H "Content-Type: application/json" -d '{"user_input": "What is the best fertilizer for wheat?"}'curl -X POST "http://localhost:5000/upload_image" -F "image=@path/to/your/image.jpg"curl -X POST "http://localhost:5000/upload_audio" -F "audio=@path/to/your/audio.wav"├── app.py # Main application file
├── config.py # Configuration file for API keys
├── requirements.txt # Dependencies
├── static/ # Static assets (images, CSS, JS)
├── templates/ # HTML templates
├── data/ # Storage for processed data
└── models/ # ML models for language and image processing
- Jyot Buch, Nidhi Baheti - Lead Developers
This project is licensed under the MIT License. See LICENSE for details.