azrai99 commited on
Commit
78d4c43
·
verified ·
1 Parent(s): c875dd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -236,8 +236,6 @@ def transfer_learning_forecasting():
236
  grid_table = AgGrid(
237
  df_grid,
238
  theme="alpine",
239
- fit_columns_on_grid_load=True,
240
- height=360,
241
  )
242
 
243
  with tab_forecast:
@@ -245,8 +243,6 @@ def transfer_learning_forecasting():
245
  grid_table = AgGrid(
246
  df_grid,
247
  theme="alpine",
248
- fit_columns_on_grid_load=True,
249
- height=360,
250
  )
251
 
252
  with col2:
@@ -263,9 +259,10 @@ def transfer_learning_forecasting():
263
  forecast_results['LSTM'] = generate_forecast(lstm_model, df)
264
  elif model_choice == "TFT":
265
  forecast_results['TFT'] = generate_forecast(tft_model, df)
266
-
267
- for model_name, forecast_df in forecast_results.items():
268
- plot_forecasts(forecast_df, df, f'{model_name} Forecast for {y_col}')
 
269
 
270
  end_time = time.time() # End timing
271
  time_taken = end_time - start_time
@@ -304,8 +301,8 @@ def dynamic_forecasting():
304
  dynamic_horizon = st.sidebar.number_input("Forecast horizon", value=18)
305
  dynamic_max_steps = st.sidebar.number_input('Max steps', value=200)
306
 
307
-
308
- forecast_time_series(df, dynamic_model_choice, dynamic_horizon, dynamic_max_steps,y_col)
309
 
310
  pg = st.navigation({
311
  "Overview": [
 
236
  grid_table = AgGrid(
237
  df_grid,
238
  theme="alpine",
 
 
239
  )
240
 
241
  with tab_forecast:
 
243
  grid_table = AgGrid(
244
  df_grid,
245
  theme="alpine",
 
 
246
  )
247
 
248
  with col2:
 
259
  forecast_results['LSTM'] = generate_forecast(lstm_model, df)
260
  elif model_choice == "TFT":
261
  forecast_results['TFT'] = generate_forecast(tft_model, df)
262
+
263
+ if st.sidebar.button("Submit"):
264
+ for model_name, forecast_df in forecast_results.items():
265
+ plot_forecasts(forecast_df, df, f'{model_name} Forecast for {y_col}')
266
 
267
  end_time = time.time() # End timing
268
  time_taken = end_time - start_time
 
301
  dynamic_horizon = st.sidebar.number_input("Forecast horizon", value=18)
302
  dynamic_max_steps = st.sidebar.number_input('Max steps', value=200)
303
 
304
+ if st.sidebar.button("Submit"):
305
+ forecast_time_series(df, dynamic_model_choice, dynamic_horizon, dynamic_max_steps,y_col)
306
 
307
  pg = st.navigation({
308
  "Overview": [