bright1 commited on
Commit
f3dd5c4
1 Parent(s): a83ef18

Button click calls api

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -69,11 +69,13 @@ city = st.sidebar.selectbox("city:", options= CITIES)
69
  store_type= st.sidebar.selectbox('type', options=[0, 1, 2, 3, 4])
70
  cluster = st.sidebar.selectbox('cluster', options = CLUSTER )
71
 
72
- # make prediction
73
- sales_value = make_prediction(store_id, category_id, onpromotion,city, store_type, cluster, date)
74
 
75
  # get predicted value
76
  if st.sidebar.button('Predict', use_container_width=True, type='primary'):
 
 
77
  st.success('The predicted target is ' + str(sales_value))
78
 
79
 
 
69
  store_type= st.sidebar.selectbox('type', options=[0, 1, 2, 3, 4])
70
  cluster = st.sidebar.selectbox('cluster', options = CLUSTER )
71
 
72
+
73
+
74
 
75
  # get predicted value
76
  if st.sidebar.button('Predict', use_container_width=True, type='primary'):
77
+ # make prediction
78
+ sales_value = make_prediction(store_id, category_id, onpromotion,city, store_type, cluster, date)
79
  st.success('The predicted target is ' + str(sales_value))
80
 
81