Spaces:
Sleeping
Sleeping
Update Business_and_Data_Understanding.py
Browse files
Business_and_Data_Understanding.py
CHANGED
|
@@ -1,15 +1,13 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
|
| 3 |
-
# Set page configuration (Must be the first Streamlit command)
|
| 4 |
st.set_page_config(page_title="Crop Recommendation", page_icon="🌾", layout="wide")
|
| 5 |
|
| 6 |
-
# Display the logo
|
| 7 |
st.image(
|
| 8 |
"https://huggingface.co/spaces/varshitha22/Crop_Recommendation/resolve/main/inno_logo.jpeg",
|
| 9 |
width=800 # Adjust size as needed
|
| 10 |
)
|
| 11 |
-
|
| 12 |
-
# Title with styling using Markdown and HTML
|
| 13 |
st.markdown(
|
| 14 |
"""
|
| 15 |
<h1 style="text-align: center; color: #2E8B57;">🌾 Crop Recommendation System 🌾</h1>
|
|
@@ -18,10 +16,35 @@ st.markdown(
|
|
| 18 |
unsafe_allow_html=True,
|
| 19 |
)
|
| 20 |
|
| 21 |
-
#
|
| 22 |
st.markdown(
|
| 23 |
"<h3 style='text-align: center; color: #555;'>Providing Smart Crop Suggestions Based on Soil and Weather Conditions</h3>",
|
| 24 |
unsafe_allow_html=True,
|
| 25 |
)
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
# Set page configuration
|
|
|
|
| 3 |
st.set_page_config(page_title="Crop Recommendation", page_icon="🌾", layout="wide")
|
| 4 |
|
| 5 |
+
# Display the logo
|
| 6 |
st.image(
|
| 7 |
"https://huggingface.co/spaces/varshitha22/Crop_Recommendation/resolve/main/inno_logo.jpeg",
|
| 8 |
width=800 # Adjust size as needed
|
| 9 |
)
|
| 10 |
+
# Title with styling
|
|
|
|
| 11 |
st.markdown(
|
| 12 |
"""
|
| 13 |
<h1 style="text-align: center; color: #2E8B57;">🌾 Crop Recommendation System 🌾</h1>
|
|
|
|
| 16 |
unsafe_allow_html=True,
|
| 17 |
)
|
| 18 |
|
| 19 |
+
# Subtitle
|
| 20 |
st.markdown(
|
| 21 |
"<h3 style='text-align: center; color: #555;'>Providing Smart Crop Suggestions Based on Soil and Weather Conditions</h3>",
|
| 22 |
unsafe_allow_html=True,
|
| 23 |
)
|
| 24 |
+
|
| 25 |
+
# Display crop image
|
| 26 |
+
st.image(
|
| 27 |
+
"https://huggingface.co/spaces/varshitha22/Crop_Recommendation/resolve/main/crop%20image.jpg",
|
| 28 |
+
width=600 # Adjust size as needed
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
# Business Problem Section
|
| 32 |
+
st.markdown("""
|
| 33 |
+
### 🌱 Business Problem
|
| 34 |
+
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.
|
| 35 |
+
|
| 36 |
+
### 🎯 Business Objective
|
| 37 |
+
The goal of this project is to develop a *Crop Recommendation System* 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.
|
| 38 |
+
|
| 39 |
+
### 📊 Data Understanding
|
| 40 |
+
|
| 41 |
+
#### *Soil Nutrients:*
|
| 42 |
+
- *Nitrogen (N):* Important for leaf and stem growth (ratio of Nitrogen content in soil).
|
| 43 |
+
- *Phosphorus (P):* Helps with root and flower development (ratio of Phosphorus content in soil).
|
| 44 |
+
- *Potassium (K):* Improves plant health and water regulation (ratio of Potassium content in soil).
|
| 45 |
+
|
| 46 |
+
#### *Climate Factors:*
|
| 47 |
+
- *Temperature:* Affects plant growth and yield (temperature in degree Celsius).
|
| 48 |
+
- *Humidity:* Influences plant transpiration and disease risk (relative humidity in %).
|
| 49 |
+
- *Rainfall:* Provides water for crops and affects crop choice (rainfall in mm).
|
| 50 |
+
- *Soil pH (pH Value):* Affects how well plants absorb nutrients.
|