rajan9089 commited on
Commit
004b76a
·
verified ·
1 Parent(s): cadeeec

update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -7
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.number_input("Nitrogen content", step=0.1, help="Enter Nitrogen content")
17
- P = st.number_input("Phosphorus content", step=0.1, help="Enter Phosphorus content")
18
- K = st.number_input("Potassium content", step=0.1, help="Enter Potassium content")
19
- temp = st.number_input("Temperature in °C", step=0.1, help="Enter Temperature in °C")
20
- humidity = st.number_input("Humidity in %", step=0.1, help="Enter Humidity in %")
21
- ph = st.number_input("pH value", step=0.1, help="Enter pH value")
22
- rainfall = st.number_input("Rainfall in mm", step=0.1, help="Enter Rainfall in mm")
 
 
 
 
 
 
 
 
 
 
 
 
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]