Spaces:
Runtime error
Runtime error
Button click calls api
Browse files
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 |
-
|
73 |
-
|
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 |
|