{"id":26241464,"url":"https://github.com/samarth4023/shell-internship-1","last_synced_at":"2026-04-20T06:02:06.630Z","repository":{"id":273819705,"uuid":"920985802","full_name":"Samarth4023/Shell-Internship-1","owner":"Samarth4023","description":"🌱 Crop \u0026 Fertilizer Recommendation System using Machine Learning  This project is developed as part of my AICTE-Shell Internship and aims to optimize agriculture by leveraging Machine Learning (ML) and Artificial Intelligence (AI). The system provides real-time recommendations for crop selection and fertilizer application.","archived":false,"fork":false,"pushed_at":"2025-03-15T13:03:27.000Z","size":20606,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T21:40:40.653Z","etag":null,"topics":["ai","artificial-intelligence","ensemble-model","machine-learning","ml","streamlit"],"latest_commit_sha":null,"homepage":"https://crop-fertilizer-recommendation.streamlit.app/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samarth4023.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-23T05:56:45.000Z","updated_at":"2025-03-15T13:03:31.000Z","dependencies_parsed_at":"2025-03-01T11:33:03.797Z","dependency_job_id":null,"html_url":"https://github.com/Samarth4023/Shell-Internship-1","commit_stats":null,"previous_names":["samarth4023/aicte-shell-internship","samarth4023/shell-internship","samarth4023/shell-internship-1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Samarth4023/Shell-Internship-1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samarth4023%2FShell-Internship-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samarth4023%2FShell-Internship-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samarth4023%2FShell-Internship-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samarth4023%2FShell-Internship-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samarth4023","download_url":"https://codeload.github.com/Samarth4023/Shell-Internship-1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samarth4023%2FShell-Internship-1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278598620,"owners_count":26013291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","ensemble-model","machine-learning","ml","streamlit"],"created_at":"2025-03-13T08:30:17.076Z","updated_at":"2025-10-06T11:08:38.415Z","avatar_url":"https://github.com/Samarth4023.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nlicense: apache-2.0\ntitle: 🌱 Crop \u0026 Fertilizer Recommendation System\nsdk: streamlit\nemoji: 🌍\ncolorFrom: green\ncolorTo: blue\npinned: false\nthumbnail: \u003e-\n  https://cdn-uploads.huggingface.co/production/uploads/6686260107019f3fe482ce08/1bMo8NSG3us4-ggFtRyM5.jpeg\nshort_description: The system provides real-time recommendations for crp \u0026 fert\nsdk_version: 1.43.2\n---\n# **🌱 Crop \u0026 Fertilizer Recommendation System**  \n\n## **📌 Introduction**  \nThis project is a **AI Powered Crop \u0026 Fertilizer Recommendation System**, developed as part of my **AICTE-Shell Internship**. The system provides **personalized crop and fertilizer recommendations** based on soil composition, weather conditions, and crop requirements.  \n\n🔗 **Deployed Application:** [Crop \u0026 Fertilizer Recommendation System](https://huggingface.co/spaces/SamarthPujari/Crop-and-Fertilizer-Recommendation-System)  \n\n## **🎯 Project Goals**  \n✅ Integrate **AI and Green Skills** into agriculture.  \n✅ Explore **Machine Learning techniques** for precision farming.  \n✅ Develop a **real-time recommendation system** for farmers.  \n✅ Enhance **data preprocessing, model selection, and optimization skills**.  \n✅ Deploy an **interactive web app** using **Streamlit**.  \n\n## **📂 Datasets Used**  \nThe project uses two datasets:  \n\n### **1️⃣ Crop Dataset**  \n- **Features:** Nitrogen, Phosphorous, Potassium, Temperature, Humidity, pH, Rainfall  \n- **Target Variable:** Crop Label (Crop Name)  \n\n### **2️⃣ Fertilizer Dataset**  \n- **Features:** Temperature, Humidity, Moisture, Soil Type, Crop Type, Nitrogen, Phosphorous, Potassium  \n- **Target Variable:** Fertilizer Name  \n\n## **📊 Methodology**  \n\n### **Step 1: Data Collection \u0026 Preprocessing**  \n🔹 **Performed Exploratory Data Analysis (EDA)** to understand data distributions.  \n🔹 **Encoded categorical variables** using Label Encoding.  \n🔹 **Split the dataset** into **train \u0026 test sets** using Scikit-Learn.  \n\n### **Step 2: Model Selection \u0026 Training**  \n🔹 Tested multiple **ML algorithms**, including:  \n   - Logistic Regression, GaussianNB, SVC, KNN, DecisionTree, ExtraTree, RandomForest, Bagging, Gradient Boosting, AdaBoost, CatBoost, and LGBM.\n\n🔹 Compared **model performance** based on accuracy \u0026 validation metrics.  \n\n### **Step 3: Ensemble Learning for Optimization**  \n🔹 Evaluated different ensemble techniques:  \n   - **Voting Classifier, Stacking, Averaging Probabilities, Weighted Ensemble, Blend Ensemble (Custom Blending).**\n\n🔹 **Blend Ensemble provided the best results**, so it was selected.  \n🔹 **Cross-validation** was performed to validate model performance.  \n\n### **Step 4: Deployment \u0026 Integration**  \n🔹 Exported trained models as **.pkl files** (`crop_recommendation.pkl`, `fertilizer_recommendation.pkl`).  \n🔹 Integrated models into a **Streamlit app** for real-time predictions.  \n🔹 **Deployed the application on Streamlit Cloud.**  \n\n## **🔍 Key Features**  \n✅ **Real-time Model Performance Metrics** (Accuracy Tracking).  \n✅ **Feature Importance Analysis** for better interpretability.  \n✅ **Feature Distributions** to understand data variations.  \n✅ **Prediction Probabilities** to assess model confidence.  \n\n## **🚀 Technologies Used**  \n| Category            | Tools \u0026 Libraries |\n|---------------------|-------------------|\n| **Development**    | Python, Jupyter Notebook, Anaconda |\n| **ML Frameworks**  | Scikit-Learn, CatBoost, LGBM |\n| **Data Processing**| Pandas, NumPy |\n| **Visualization**  | Matplotlib, Seaborn, Plotly |\n| **Deployment**     | HuggingFace, Streamlit, Streamlit Cloud |\n\n## **📷 Screenshots**  \n\n| **Streamlit App - Crop Recommendation** |\n|-----------------------------------------|\n|![Screenshot_20250211_223522_Chrome-imageonline co-merged](https://github.com/user-attachments/assets/7c3b2339-37c4-49ba-8ee4-a74e5d7575ac)|\n\n| **Streamlit App - Fertilizer Recommendation** |\n|-----------------------------------------------|\n|![Screenshot_20250211_223923_Chrome-imageonline co-merged](https://github.com/user-attachments/assets/63446c22-de9c-4b9c-a3f3-e576bc7294e5)|\n\n## **🎯 Future Improvements**  \n🔹 Expand the dataset to include **more crop varieties \u0026 soil types**.  \n🔹 Integrate **real-time weather data** for better recommendations.  \n🔹 Incorporate **IoT \u0026 satellite data** for advanced precision farming.  \n🔹 Optimize **model efficiency \u0026 deployment** for faster predictions.  \n\n## **📥 Installation \u0026 Setup**  \n\n### **🔹 Clone the Repository**  \n```bash\ngit clone https://github.com/Samarth4023/Shell-Internship-1.git\ncd Shell-Internship-1\n```\n\n### **🔹 Install Required Dependencies**  \n```bash\npip install -r requirements.txt\n```\n\n### **🔹 Run the Streamlit App**  \n```bash\nstreamlit run app.py\n```\n\n## **📜 License**  \nThis project is **open-source** and free to use. Feel free to contribute!  \n\n## **📧 Contact**  \n📌 **Author:** Samarth Pujari  \n📌 **GitHub:** [Samarth4023](https://github.com/Samarth4023)  \n📌 **LinkedIn:** [Samarth Pujari](https://www.linkedin.com/in/samarth-pujari-328a1326a)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamarth4023%2Fshell-internship-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamarth4023%2Fshell-internship-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamarth4023%2Fshell-internship-1/lists"}