Spaces:
Runtime error
Runtime error
Update pages/1_Store Demand Forecasting.py
Browse files
pages/1_Store Demand Forecasting.py
CHANGED
@@ -177,7 +177,7 @@ if option=='TFT':
|
|
177 |
|
178 |
#--------------------------------------------------------------------------------------------------------------
|
179 |
# tabs
|
180 |
-
tab1,tab2,tab3=st.tabs(['📈Forecast Plot','🗃Forecast Table','🗃Actual Table'])
|
181 |
#------------------------------------------------Tab-1-----------------------------------------------------------
|
182 |
tab1.markdown("""
|
183 |
<div style='text-align: left; margin-top:-10px;margin-bottom:-10px;'>
|
@@ -397,7 +397,7 @@ elif option=='Prophet':
|
|
397 |
st.dataframe(pd.DataFrame({"KPI":['RMSE','MAE'],"Prophet":[rmse,mae]}).set_index('KPI'),width=300)
|
398 |
|
399 |
#---------------------------------------Tabs-----------------------------------------------------------------------
|
400 |
-
tab1,tab2,tab3=st.tabs(['📈Forecast Plot','🗃Forecast Table','🗃Actual Table'])
|
401 |
#-------------------------------------------Tab-1=Forecast plot---------------------------------------------------
|
402 |
tab1.markdown("""
|
403 |
<div style='text-align: left; margin-top:-10px;margin-bottom:-10px;'>
|
@@ -477,17 +477,18 @@ elif option=='Prophet':
|
|
477 |
)
|
478 |
|
479 |
#------------------------------------------Tab-3--------------------------------------------------
|
480 |
-
train_a=fb_train_data.loc[fb_train_data[item]==1][['ds','
|
481 |
-
train_a['store']=1
|
482 |
-
train_a['item']=item
|
483 |
-
|
484 |
-
test_a
|
485 |
-
test_a['
|
486 |
-
test_a['item']=item
|
487 |
-
test_a.rename({'y':'sales',"ds":'date'})
|
488 |
actual_final_data=pd.concat([train_a,test_a])
|
|
|
|
|
489 |
actual_final_data['ds']=actual_final_data['ds'].dt.date
|
490 |
-
|
|
|
491 |
|
492 |
|
493 |
|
|
|
177 |
|
178 |
#--------------------------------------------------------------------------------------------------------------
|
179 |
# tabs
|
180 |
+
tab1,tab2,tab3=st.tabs(['📈Forecast Plot','🗃Forecast Table','🗃Actual Table']) #
|
181 |
#------------------------------------------------Tab-1-----------------------------------------------------------
|
182 |
tab1.markdown("""
|
183 |
<div style='text-align: left; margin-top:-10px;margin-bottom:-10px;'>
|
|
|
397 |
st.dataframe(pd.DataFrame({"KPI":['RMSE','MAE'],"Prophet":[rmse,mae]}).set_index('KPI'),width=300)
|
398 |
|
399 |
#---------------------------------------Tabs-----------------------------------------------------------------------
|
400 |
+
tab1,tab2,tab3=st.tabs(['📈Forecast Plot','🗃Forecast Table','🗃Actual Table']) # '🗃Actual Table'
|
401 |
#-------------------------------------------Tab-1=Forecast plot---------------------------------------------------
|
402 |
tab1.markdown("""
|
403 |
<div style='text-align: left; margin-top:-10px;margin-bottom:-10px;'>
|
|
|
477 |
)
|
478 |
|
479 |
#------------------------------------------Tab-3--------------------------------------------------
|
480 |
+
train_a=fb_train_data.loc[fb_train_data[item]==1][['ds','sales']]
|
481 |
+
# train_a['store']=1
|
482 |
+
# train_a['item']=item
|
483 |
+
test_a=fb_test_data.loc[fb_test_data[item]==1][['ds','sales']]
|
484 |
+
# test_a['store']=1
|
485 |
+
# test_a['item']=item.split('_')[-1]
|
|
|
|
|
486 |
actual_final_data=pd.concat([train_a,test_a])
|
487 |
+
actual_final_data['store']=1
|
488 |
+
actual_final_data['item']=item.split('_')[-1]
|
489 |
actual_final_data['ds']=actual_final_data['ds'].dt.date
|
490 |
+
actual_final_data.rename({"ds":'date'},inplace=True)
|
491 |
+
tab3.dataframe(actual_final_data[['date','store','item','sales']],width=500)
|
492 |
|
493 |
|
494 |
|