File size: 3,098 Bytes
8a93b58
55c58d9
1407cdb
7098835
b093382
1407cdb
b093382
 
adcfce0
b093382
 
 
 
 
1407cdb
b093382
7098835
b093382
 
1407cdb
 
55c58d9
1407cdb
d4b8885
1407cdb
 
 
 
 
 
 
 
95e02e7
1407cdb
 
 
 
55c58d9
 
 
1407cdb
 
55c58d9
 
 
 
 
c690d4f
 
3f1c25d
c690d4f
 
3f1c25d
c690d4f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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)