Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
|
@@ -13,13 +13,25 @@ st.title("Crop Recommendation System 🌱")
|
|
| 13 |
# Create a sidebar for input fields
|
| 14 |
with st.sidebar:
|
| 15 |
st.header("Input Parameters")
|
| 16 |
-
N = st.
|
| 17 |
-
P = st.
|
| 18 |
-
K = st.
|
| 19 |
-
temp = st.
|
| 20 |
-
humidity = st.
|
| 21 |
-
ph = st.
|
| 22 |
-
rainfall = st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
if st.button("Get Recommendation"):
|
| 25 |
feature_list = [N, P, K, temp, humidity, ph, rainfall]
|
|
|
|
| 13 |
# Create a sidebar for input fields
|
| 14 |
with st.sidebar:
|
| 15 |
st.header("Input Parameters")
|
| 16 |
+
N = st.text_input("Nitrogen content", placeholder="Enter Nitrogen content")
|
| 17 |
+
P = st.text_input("Phosphorus content", placeholder="Enter Phosphorus content")
|
| 18 |
+
K = st.text_input("Potassium content", placeholder="Enter Potassium content")
|
| 19 |
+
temp = st.text_input("Temperature in °C", placeholder="Enter Temperature in °C")
|
| 20 |
+
humidity = st.text_input("Humidity in %", placeholder="Enter Humidity in %")
|
| 21 |
+
ph = st.text_input("pH value", placeholder="Enter pH value")
|
| 22 |
+
rainfall = st.text_input("Rainfall in mm", placeholder="Enter Rainfall in mm")
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
# Create a sidebar for input fields
|
| 26 |
+
with st.sidebar:
|
| 27 |
+
st.header("Input Parameters")
|
| 28 |
+
N = st.number_input("Nitrogen content", min_value=0.0, step=0.1, help="Enter Nitrogen content")
|
| 29 |
+
P = st.number_input("Phosphorus content", min_value=0.0, step=0.1, help="Enter Phosphorus content")
|
| 30 |
+
K = st.number_input("Potassium content", min_value=0.0, step=0.1, help="Enter Potassium content")
|
| 31 |
+
temp = st.number_input("Temperature in °C", min_value=0.0, step=0.1, help="Enter Temperature in °C")
|
| 32 |
+
humidity = st.number_input("Humidity in %", min_value=0.0, step=0.1, help="Enter Humidity in %")
|
| 33 |
+
ph = st.number_input("pH value", min_value=0.0, step=0.1, help="Enter pH value")
|
| 34 |
+
rainfall = st.number_input("Rainfall in mm", min_value=0.0, step=0.1, help="Enter Rainfall in mm")
|
| 35 |
|
| 36 |
if st.button("Get Recommendation"):
|
| 37 |
feature_list = [N, P, K, temp, humidity, ph, rainfall]
|