nishantguvvada commited on
Commit
5c49502
·
verified ·
1 Parent(s): 7b46dfc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -16,6 +16,9 @@ st.set_page_config(
16
 
17
  model = pickle.load(open('crop_model.pkl','rb'))
18
 
 
 
 
19
  check_crops = {1: 'rice',
20
  2: 'maize',
21
  3: 'jute',
@@ -66,25 +69,25 @@ with st.sidebar:
66
  st.write("Input Settings:")
67
 
68
  #define the N for the model
69
- n_value = st.slider('N :', 0.0, 150.0, 20)
70
 
71
  #define the P for the model
72
- p_value = st.slider('P :', 0.0, 150.0, 20)
73
 
74
  #define the K for the model
75
- k_value = st.slider('K :', 0.0, 200.0, 40)
76
 
77
  #define the temperature for the model
78
  temperature = st.slider('Temperature :', 0.0, 50.0, 10.0)
79
 
80
  #define the humidity for the model
81
- humidity = st.slider('Humidity :', 0.0, 100.0, 40)
82
 
83
  #define the ph for the model
84
  ph_value = st.slider('ph :', 0.0, 10.0, 2.0)
85
 
86
  #define the rainfall for the model
87
- rainfall = st.slider('Rainfall :', 10.0, 300.0, 40)
88
 
89
  if st.button("Recommend"):
90
  output(n_value, p_value, k_value, temperature, humidity, ph_value, rainfall)
 
16
 
17
  model = pickle.load(open('crop_model.pkl','rb'))
18
 
19
+ ss = pickle.load(open('standardscaler.pkl','rb'))
20
+ ms = pickle.load(open('minmaxscaler.pkl','rb'))
21
+
22
  check_crops = {1: 'rice',
23
  2: 'maize',
24
  3: 'jute',
 
69
  st.write("Input Settings:")
70
 
71
  #define the N for the model
72
+ n_value = st.slider('N :', 0.0, 150.0, 20.0)
73
 
74
  #define the P for the model
75
+ p_value = st.slider('P :', 0.0, 150.0, 20.0)
76
 
77
  #define the K for the model
78
+ k_value = st.slider('K :', 0.0, 200.0, 40.0)
79
 
80
  #define the temperature for the model
81
  temperature = st.slider('Temperature :', 0.0, 50.0, 10.0)
82
 
83
  #define the humidity for the model
84
+ humidity = st.slider('Humidity :', 0.0, 100.0, 40.0)
85
 
86
  #define the ph for the model
87
  ph_value = st.slider('ph :', 0.0, 10.0, 2.0)
88
 
89
  #define the rainfall for the model
90
+ rainfall = st.slider('Rainfall :', 10.0, 300.0, 40.0)
91
 
92
  if st.button("Recommend"):
93
  output(n_value, p_value, k_value, temperature, humidity, ph_value, rainfall)