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.
- π 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).
- 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.
Follow these steps to set up the app on your local machine:
-
Clone the repository:
git clone https://github.com/yourusername/agricultural-yield-prediction-app.git
-
Navigate to the project directory:
cd agricultural-yield-prediction-app
-
Install the required Python packages:
pip install streamlit groq
-
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"
-
Run the app:
streamlit run app.py
- Open the app using the demo link provided above or run it locally using Streamlit.
- Choose the input method: Use a custom prompt or fill in parameters for a structured input.
- Enter the required details: Depending on your chosen method, fill in climate zone, region, soil type, weather conditions, and other relevant fields.
- Click the "Predict Yield" button to generate the yield prediction.
- Clear inputs using the "Clear" button if you want to start over.
To use this app, you need a Groq API key:
- Sign up on IBM to get your API key.
- Replace
"your_ibm_api_key_here"
in the script with your actual API key.
This project is licensed under the MIT License. See the LICENSE file for more details.
- 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.
For any questions or feedback, please feel free to reach us!