Circhastic commited on
Commit
905a52b
·
1 Parent(s): 6129848

Version 1 hotfix #9 for merge

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -190,8 +190,7 @@ def merge_forecast_data(historical, test, future):
190
  historical.head()
191
  test.head()
192
  future.head()
193
- merged_dataframe = pd.merge_ordered(historical, pd.merge_ordered(test, future, left_on='Date', right_on='Date'), left_on='Date', right_on='Date')
194
-
195
 
196
  return merged_dataframe
197
 
@@ -250,7 +249,7 @@ if 'forecasted' not in st.session_state:
250
  # Sidebar Menu
251
  with st.sidebar:
252
  # TODO Name for product
253
- st.title("MaLaCast v1.0")
254
  st.subheader("An intelligent sales forecasting system")
255
  uploaded_file = st.file_uploader("Upload your store data here to proceed (must atleast contain Date and Sales)", type=["csv"])
256
  if uploaded_file is not None:
@@ -353,6 +352,9 @@ if (st.session_state.uploaded):
353
  col[1].write(df)
354
  st.session_state.forecasted = True
355
 
 
 
 
356
  with st.form("question_form"):
357
  question = st.text_input('Ask a Question about the Forecasted Data', placeholder="What is the total sales in the month of December?")
358
  query_button = st.form_submit_button(label='Generate Answer')
 
190
  historical.head()
191
  test.head()
192
  future.head()
193
+ merged_dataframe = pd.merge_ordered(historical, pd.merge_ordered(test, future, fill_method="ffill", left_by="group"), fill_method="ffill", left_by="group")
 
194
 
195
  return merged_dataframe
196
 
 
249
  # Sidebar Menu
250
  with st.sidebar:
251
  # TODO Name for product
252
+ st.title("MLCast v1.0")
253
  st.subheader("An intelligent sales forecasting system")
254
  uploaded_file = st.file_uploader("Upload your store data here to proceed (must atleast contain Date and Sales)", type=["csv"])
255
  if uploaded_file is not None:
 
352
  col[1].write(df)
353
  st.session_state.forecasted = True
354
 
355
+ test_y, predictions = np.array(test_y), np.array(fitted)
356
+ forecast_accuracy(predictions, test_y)
357
+
358
  with st.form("question_form"):
359
  question = st.text_input('Ask a Question about the Forecasted Data', placeholder="What is the total sales in the month of December?")
360
  query_button = st.form_submit_button(label='Generate Answer')