Skip to content

Tejeswar001/AI-Crop-Advisor

Repository files navigation

AgroSmart Logo

AgroSmart

AI-powered Smart Agriculture Platform

Crop recommendation, disease detection, weather insights, and market intelligence in one beautiful app.


🚀 Features

  • AI Crop Recommendation: Get personalized crop suggestions based on soil and climate data.
  • Plant Disease Detection: Upload leaf images and detect diseases using deep learning.
  • Weather Dashboard: Real-time weather and 7-day forecasts for major Indian cities.
  • Market Prices: View current crop prices and trends from top markets.
  • Beautiful UI: Modern, responsive design for desktop and mobile.

🗂️ Project Structure

Sunflower Project/
├── backend/           # Flask backend (API endpoints)
├── frontend/          # HTML, CSS, JS (UI)
├── data_ml/           # ML models, notebooks, datasets
│   ├── models/        # Trained model files (.pth, .pkl, .json)
│   └── notebooks/     # Jupyter notebooks for training
├── crop_information.csv
├── crop_recommendation_dataset.csv
├── market_prices.csv
├── weather_forecast.csv
├── requirements.txt   # Python dependencies
└── README.md          # Project documentation

⚡ Quick Start

  1. Clone the repo:

    git clone https://github.com/Tejeswar001/Sunflower-Project.git
    cd Sunflower-Project
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Run the Flask backend:

    cd backend
    python app.py
  4. Open index.html in your browser (or use a local server for full functionality).


🧠 Machine Learning

  • Crop Recommendation: Trained with scikit-learn on soil and climate features.
  • Disease Detection: MobileNetV3 deep learning model, trained on Kaggle's New Plant Diseases Dataset.
  • Class Labels: See data_ml/models/class_labels.json for all supported diseases.

🌐 APIs Used

  • Open-Meteo API (open-meteo.com) — Free weather forecast API for real-time and 7-day weather data.
  • Nominatim Geocoding API (nominatim.org) — Free geocoding service to convert city names to latitude/longitude.
  • Agmarknet (Govt. of India) (agmarknet.gov.in) — Official crop price data (used for sample/extension, not direct API).

🌦️ Weather & Market Data

  • Weather: Powered by Open-Meteo API and Nominatim geocoding.
  • Market Prices: Sample data included; can be extended with real-time sources.

📁 Notebooks & Datasets

  • Jupyter notebooks for model training and evaluation in data_ml/notebooks/
  • Datasets and model files in data_ml/models/

🖥️ Frontend

  • Responsive UI with modern design
  • Crop advisor, weather dashboard, disease detection, and market analytics
  • Easy navigation and mobile support

🛠️ Tech Stack

  • Python, Flask
  • scikit-learn, PyTorch, torchvision
  • HTML, CSS, JavaScript
  • Chart.js for analytics

📚 Documentation

  • All endpoints and features are documented in code comments and this README.
  • For ML details, see the Jupyter notebooks in data_ml/notebooks/.

🤝 Contributing

Pull requests and suggestions are welcome! Please open an issue for major changes.


📄 License

This project is licensed under the MIT License

About

A web app that uses machine learning to recommend crops, detect plant diseases, and provide real-time weather and market insights for farmers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors