An intelligent AI-powered web application to help farmers with crop management, disease detection, weather insights, and expert advice in multiple Indian languages.
- 🤖 AI Chatbot - Get instant farming advice powered by Google Gemini AI
- 📷 Crop Disease Detection - Upload photos of crops to identify diseases and get treatment recommendations
- 🌤️ Weather Integration - Real-time weather data with farming-specific tips
- 📋 Crop Advisory - Expert tips on soil health, water management, pest control, and more
- 🌐 Multi-Language Support - Available in English, Hindi, Tamil, Telugu, and Marathi
- 🎤 Voice Input - Speak your questions for hands-free assistance
- 🔐 User Authentication - Secure login and registration system
- Python 3.8 or higher
- Google Gemini API Key
- OpenWeatherMap API Key (free tier available)
-
Clone/Download the project
-
Install dependencies:
cd Farmers_Sathi pip install -r requirements.txt -
Configure API Keys:
Edit
config.pyand add your API keys:GEMINI_API_KEY = 'your-gemini-api-key' WEATHER_API_KEY = 'your-openweathermap-api-key'
Or create a
.envfile:GEMINI_API_KEY=your-gemini-api-key WEATHER_API_KEY=your-openweathermap-api-key SECRET_KEY=your-secret-key -
Run the application:
python app.py
-
Open in browser:
http://localhost:8080
Farmers_Sathi/
├── app.py # Main Flask application
├── config.py # Configuration & API keys
├── requirements.txt # Python dependencies
├── README.md # This file
│
├── database/
│ └── farmer.db # SQLite database (auto-created)
│
├── models/
│ ├── user.py # User model & auth
│ └── advisory.py # Crop advisory data
│
├── services/
│ ├── auth_service.py # Login/registration logic
│ ├── chatbot_service.py # AI chatbot & image analysis
│ ├── weather_service.py # Weather API integration
│ ├── language_service.py # Multi-language translations
│ └── image_service.py # Image upload handling
│
├── static/
│ ├── css/
│ │ └── style.css # Premium UI styles
│ ├── js/
│ │ ├── chatbot.js # Chat functionality
│ │ └── main.js # General UI scripts
│ └── uploads/ # User uploaded images
│
└── templates/
├── base.html # Base template
├── login.html # Login page
├── register.html # Registration page
├── dashboard.html # Main dashboard
├── chatbot.html # AI chat interface
├── weather.html # Weather page
└── advisory.html # Crop advisory
- Go to Google AI Studio
- Create a new API key
- Add it to
config.pyor.env
- Sign up at OpenWeatherMap
- Get your free API key
- Add it to
config.pyor.env
| Language | Code |
|---|---|
| English | en |
| Hindi | hi |
| Tamil | ta |
| Telugu | te |
| Marathi | mr |
- Ask questions about farming, crops, pests, and diseases
- Get responses in your preferred language
- Voice input support for hands-free use
- Conversation history for context-aware responses
- Upload photos of affected crops
- AI analyzes the image using Google Gemini Vision
- Get detailed diagnosis with treatment recommendations
- Works with photos from camera or gallery
- Current weather conditions for your location
- 5-day forecast
- Farming-specific advice based on weather
- Alerts for extreme conditions
python app.pyThe server runs with debug mode enabled for development.
The SQLite database is automatically created when you first run the app.
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit issues and pull requests.
Made with ❤️ for Indian Farmers