Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| # Set page configuration | |
| st.set_page_config(page_title="Crop Compass", page_icon="πΎ", layout="wide") | |
| # Title with styling | |
| st.markdown( | |
| """ | |
| <h1 style="text-align: center; color: #2E8B57;">π§ Crop Compass : Smart Farming with Soil & Seasons π±ππ¦οΈ</h1> | |
| <hr style="border: 1px solid #2E8B57;"> | |
| """, | |
| unsafe_allow_html=True, | |
| ) | |
| # Subtitle | |
| st.markdown( | |
| "<h3 style='text-align: center; color: #555;'>Guiding Farmers to the Best Crops with Smart Soil & Weather Insights</h3>", | |
| unsafe_allow_html=True, | |
| ) | |
| # Display crop image | |
| st.image( | |
| "https://huggingface.co/spaces/varshitha22/Crop_Recommendation/resolve/main/crop%20image.jpg", | |
| width=900 # Adjust size as needed | |
| ) | |
| # Business Problem Section | |
| st.markdown(""" | |
| ### π± Business Problem | |
| Farmers often struggle to decide which crop to grow because soil quality, weather, and rainfall change from place to place. If they choose the wrong crop, they may get a poor harvest, lose money, and damage the soil. Many farmers choose crops based on experience instead of scientific data, which can lead to poor harvests. Soil nutrients like Nitrogen, Phosphorus, and Potassium, along with temperature, humidity, pH, and rainfall, affect crop growth. | |
| ### π― Business Objective | |
| The goal of this project is to develop a *Crop Compass: Smart Farming with Soil & Seasons* that helps farmers make data-driven decisions* on crop selection. By analyzing key factors such as soil nutrients (Nitrogen, Phosphorus, Potassium), weather conditions (temperature, humidity, rainfall), and soil pH, the system will provide *accurate crop suggestions* suited to specific land conditions. | |
| ### π Data Understanding | |
| #### *Soil Nutrients:* | |
| - **Nitrogen (N):** Important for leaf and stem growth (ratio of Nitrogen content in soil). | |
| - **Phosphorus (P):** Helps with root and flower development (ratio of Phosphorus content in soil). | |
| - **Potassium (K):** Improves plant health and water regulation (ratio of Potassium content in soil). | |
| #### *Climate Factors:* | |
| - **Temperature:** Affects plant growth and yield (temperature in degrees Celsius). | |
| - **Humidity:** Influences plant transpiration and disease risk (relative humidity in %). | |
| - **Rainfall:** Provides water for crops and affects crop choice (rainfall in mm). | |
| - **Soil pH (pH Value):** Affects how well plants absorb nutrients. | |
| """) | |
| st.markdown("<h3 style='text-align: left; color: #D35400;'>Soil Nutrients</h3>", unsafe_allow_html=True) | |
| st.markdown("<ul style='color: #1F618D;'><li><b>Nitrogen</b> (N)</li><li><b>Phosphorus</b> (P)</li><li><b>Potassium</b> (K)</li></ul>", unsafe_allow_html=True) | |
| st.markdown("<h3 style='text-align: left; color: #28B463;'>Climate Factors</h3>", unsafe_allow_html=True) | |
| st.markdown("<ul style='color: #1F618D;'><li><b>Temperature</b></li><li><b>Humidity</b></li><li><b>Rainfall</b></li></ul>", unsafe_allow_html=True) | |
| st.markdown("<h3 style='text-align: left; color: #AF7AC5;'>Soil pH</h3>", unsafe_allow_html=True) | |
| st.markdown("<ul style='color: #1F618D;'><li><b>pH Value</b></li></ul>", unsafe_allow_html=True) |