Commit
·
7252d7f
1
Parent(s):
b9f9327
Update app.py
Browse files
app.py
CHANGED
@@ -51,4 +51,12 @@ forecast= model.predict(inputs)
|
|
51 |
st.header("Your Prediction is Displayed Below: ")
|
52 |
|
53 |
##telling my model to return the yhat of my input
|
54 |
-
st.write(forecast["yhat"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
st.header("Your Prediction is Displayed Below: ")
|
52 |
|
53 |
##telling my model to return the yhat of my input
|
54 |
+
#st.write(forecast["yhat"])
|
55 |
+
ok= st.button('forecast sales')
|
56 |
+
if ok:
|
57 |
+
input_data= [ds,onpromotion,transactions]
|
58 |
+
inputs= pd.DataFrame([input_data],columns=['ds','onpromotion','transactions'])
|
59 |
+
# making Prediction
|
60 |
+
forecast=model.predict(inputs)
|
61 |
+
output_values=forecast['yhat']
|
62 |
+
st.success (f'the estimated forecast sales ${output_values.values[0]:.2f}')
|