Spaces:
Running
Running
Circhastic
commited on
Commit
β’
ffeca50
1
Parent(s):
a84cd8c
Version 1 hotfix #13 for merge
Browse files
app.py
CHANGED
@@ -192,6 +192,7 @@ def merge_forecast_data(actual, predicted, future):
|
|
192 |
future.rename(columns={future.columns[0]: "Future Forecasted Sales"}, inplace=True)
|
193 |
|
194 |
merged_dataframe = pd.merge_ordered(actual, predicted, on='Date', suffixes=('_Actual', '_Predicted'))
|
|
|
195 |
return merged_dataframe
|
196 |
|
197 |
# TAPAS Model
|
@@ -234,11 +235,6 @@ def get_converted_answer(table, query):
|
|
234 |
converted_answer = convert_answer(get_answer(table, query))
|
235 |
return converted_answer
|
236 |
|
237 |
-
|
238 |
-
# Web Application
|
239 |
-
st.title("Forecasting Dashboard π")
|
240 |
-
st.subheader("Welcome User, start forecasting by uploading your file in the sidebar!")
|
241 |
-
|
242 |
# Session States
|
243 |
if 'uploaded' not in st.session_state:
|
244 |
st.session_state.uploaded = False
|
@@ -246,6 +242,11 @@ if 'uploaded' not in st.session_state:
|
|
246 |
if 'forecasted' not in st.session_state:
|
247 |
st.session_state.forecasted = False
|
248 |
|
|
|
|
|
|
|
|
|
|
|
249 |
# Sidebar Menu
|
250 |
with st.sidebar:
|
251 |
# TODO Name for product
|
|
|
192 |
future.rename(columns={future.columns[0]: "Future Forecasted Sales"}, inplace=True)
|
193 |
|
194 |
merged_dataframe = pd.merge_ordered(actual, predicted, on='Date', suffixes=('_Actual', '_Predicted'))
|
195 |
+
merged_dataframe = pd.merge_ordered(merged_dataframe, future, on='Date')
|
196 |
return merged_dataframe
|
197 |
|
198 |
# TAPAS Model
|
|
|
235 |
converted_answer = convert_answer(get_answer(table, query))
|
236 |
return converted_answer
|
237 |
|
|
|
|
|
|
|
|
|
|
|
238 |
# Session States
|
239 |
if 'uploaded' not in st.session_state:
|
240 |
st.session_state.uploaded = False
|
|
|
242 |
if 'forecasted' not in st.session_state:
|
243 |
st.session_state.forecasted = False
|
244 |
|
245 |
+
# Web Application
|
246 |
+
st.title("Forecasting Dashboard π")
|
247 |
+
if not st.session_state.uploaded:
|
248 |
+
st.subheader("Welcome User, start forecasting by uploading your file in the sidebar!")
|
249 |
+
|
250 |
# Sidebar Menu
|
251 |
with st.sidebar:
|
252 |
# TODO Name for product
|