Smart Farming AI Assistant is a Streamlit-based AI assistant designed to empower farmers with intelligent crop and fertilizer recommendations. By analyzing soil nutrients, weather conditions, and moisture levels, it leverages pre-trained machine learning models to predict the most suitable crops and fertilizers. This helps farmers make data-driven decisions, enhance productivity, and optimize resource usage, ultimately reducing costs and improving yield efficiency.
-
🌾 Crop Recommendation
- Predicts the most suitable crop for a given piece of land based on soil nutrients (Nitrogen, Phosphorus, Potassium), temperature, humidity, soil pH, and rainfall.
- Uses a trained machine learning model (
crop_model.pkl) to provide accurate suggestions, helping farmers maximize their yield.
-
🧪 Fertilizer Recommendation
- Suggests the best fertilizer based on soil type, crop type, moisture level, temperature, humidity, and nutrient levels.
- Uses a trained model (
fertilizer_model.pkl) to ensure optimal fertilization, improving soil health and reducing costs.
-
📊 User-Friendly UI (Streamlit)
- Provides an interactive interface where farmers can input their data easily using number inputs and dropdown menus.
- Displays instant recommendations in a simple and understandable format, making it accessible even for non-technical users.
-
🚀 Fast & Efficient Predictions
- Uses pre-trained machine learning models, making recommendations almost instantly without heavy processing.
- Can run on local devices or cloud servers, ensuring accessibility for farmers in different regions with varying internet and hardware capabilities.
git clone https://github.com/DarinJoy/SmartFarmingAI.git
cd smart-farming-aiOR
Download the zip file
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windowspip install -r requirements.txtIf you still encounter with issues of library, use the below code in terminal
pip install streamlit numpy pandas pickleEnsure the trained machine learning models (crop_model.pkl and fertilizer_model.pkl) are inside the models/ directory.
streamlit run app.pyThis will start the Smart Farming AI Assistant in your browser.
-
Monitoring Soil Health: View real-time data from connected IoT sensors on the dashboard to monitor soil conditions and receive recommendations for irrigation and fertilization.
-
Predicting Crop Yields: Utilize the predictive analytics feature to forecast crop yields based on current and historical data, aiding in effective resource planning.
- Python – Core programming language for backend logic.
- Streamlit – Web framework used to build an interactive UI.
- Pandas – Data processing and handling library.
- Scikit-learn – Machine learning library for training and using models.
- Pickle – Used for saving and loading pre-trained ML models.
This project is licensed under the MIT License. See the LICENSE file for more details.
This project was inspired by the need to integrate advanced technologies into agriculture to enhance productivity and sustainability. Special thanks to the contributors and the open-source community for their invaluable support.
Let me know if you need any other modifications!