Skip to content

🌾 Agricultural Yield Prediction App: Predict crop yield using climate, soil, weather, and irrigation data. Built with Streamlit and powered by the IBM API using the Grantie-3b model. Enter parameters or use custom prompts for tailored predictions. 🌱

Notifications You must be signed in to change notification settings

mj-awad17/Agriculture-Yield-Prediction-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌾 Agricultural Yield Prediction App

Welcome to the Agricultural Yield Prediction App! This application leverages the power of the Granite-3B to predict agricultural yield based on various factors such as climate zone, region, soil type, and more. The app is built with Streamlit, providing an interactive and user-friendly interface for making predictions.

πŸš€ Demo

πŸ‘‰ Try the live demo here!

πŸ“‹ Features

  • 🌎 Climate Zone and Region: Specify the climate zone and region of your farm to get tailored predictions.
  • 🌱 Soil and Crop Type: Input soil type and crop variety to enhance prediction accuracy.
  • 🌧️ Weather Conditions: Include historical weather data, current weather conditions, and soil moisture levels.
  • πŸ’§ Irrigation and Fertilization: Specify irrigation methods and fertilizer details.
  • πŸ–ŠοΈ Custom Prompts: Use custom prompts for personalized predictions.
  • πŸ“Š Yield Units and Prediction Period: Define the units for yield (e.g., tons per acre) and the prediction period (e.g., weekly, monthly).

πŸ› οΈ Technologies Used

  • Streamlit: A framework for building interactive web apps with Python.
  • IBM API: Used for generating yield predictions using the Granite-3b-code-base model.
  • Python: Backend logic and API integration.
  • Environment Variables: For secure API key management.

πŸ“¦ Installation

Follow these steps to set up the app on your local machine:

  1. Clone the repository:

    git clone https://github.com/yourusername/agricultural-yield-prediction-app.git
  2. Navigate to the project directory:

    cd agricultural-yield-prediction-app
  3. Install the required Python packages:

    pip install streamlit groq
  4. Set up your API key:

    Replace 'your_ibm_api_key_here' in the script with your actual Ibm API key:

    os.environ["IBM_API_KEY"] = "your_ibm_api_key_here"
  5. Run the app:

    streamlit run app.py

πŸ–₯️ How to Use

  1. Open the app using the demo link provided above or run it locally using Streamlit.
  2. Choose the input method: Use a custom prompt or fill in parameters for a structured input.
  3. Enter the required details: Depending on your chosen method, fill in climate zone, region, soil type, weather conditions, and other relevant fields.
  4. Click the "Predict Yield" button to generate the yield prediction.
  5. Clear inputs using the "Clear" button if you want to start over.

πŸ“· Screenshot

Agricultural Yield Prediction App

πŸ”‘ API Key Setup

To use this app, you need a Groq API key:

  1. Sign up on IBM to get your API key.
  2. Replace "your_ibm_api_key_here" in the script with your actual API key.

πŸ“ License

This project is licensed under the MIT License. See the LICENSE file for more details.

🌟 Acknowledgements

  • Thanks to IBM-Watsonai challange for providing the API for yield prediction.
  • Thanks to the Streamlit team for creating such an intuitive tool for building web apps.

πŸ“¬ Contact

For any questions or feedback, please feel free to reach us!

About

🌾 Agricultural Yield Prediction App: Predict crop yield using climate, soil, weather, and irrigation data. Built with Streamlit and powered by the IBM API using the Grantie-3b model. Enter parameters or use custom prompts for tailored predictions. 🌱

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages