azrai99 commited on
Commit
8993619
·
verified ·
1 Parent(s): 5616e81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -19
app.py CHANGED
@@ -272,25 +272,31 @@ def transfer_learning_forecasting():
272
  time_taken = end_time - start_time
273
  st.success(f"Time taken for {model_choice} forecast: {time_taken:.2f} seconds")
274
 
275
- tab_insample, tab_forecast = st.tabs(
276
- ["Input data", "Forecast"]
277
- )
278
-
279
- with tab_insample:
280
- df_grid = df.drop(columns="unique_id")
281
- st.write(df_grid)
282
- # grid_table = AgGrid(
283
- # df_grid,
284
- # theme="alpine",
285
- # )
286
-
287
- with tab_forecast:
288
- df_grid = forecast_results[model_choice].drop(columns="unique_id")
289
- st.write(df_grid)
290
- # grid_table = AgGrid(
291
- # df_grid,
292
- # theme="alpine",
293
- # )
 
 
 
 
 
 
294
 
295
 
296
  def dynamic_forecasting():
 
272
  time_taken = end_time - start_time
273
  st.success(f"Time taken for {model_choice} forecast: {time_taken:.2f} seconds")
274
 
275
+ st.session_state.forecast_results = forecast_results
276
+
277
+ if 'forecast_results' in st.session_state:
278
+ forecast_results = st.session_state.forecast_results
279
+
280
+ st.markdwon('You can download Input and Forecast Data below')
281
+ tab_insample, tab_forecast = st.tabs(
282
+ ["Input data", "Forecast"]
283
+ )
284
+
285
+ with tab_insample:
286
+ df_grid = df.drop(columns="unique_id")
287
+ st.write(df_grid)
288
+ # grid_table = AgGrid(
289
+ # df_grid,
290
+ # theme="alpine",
291
+ # )
292
+
293
+ with tab_forecast:
294
+ df_grid = forecast_results[model_choice]
295
+ st.write(df_grid)
296
+ # grid_table = AgGrid(
297
+ # df_grid,
298
+ # theme="alpine",
299
+ # )
300
 
301
 
302
  def dynamic_forecasting():