XPMaster commited on
Commit
5f049bf
β€’
1 Parent(s): d6165ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -44,8 +44,8 @@ data = create_data()
44
  unique_cities = data['City'].unique()
45
 
46
  # Creating tabs for each city
47
- tab_dict = {city: st.tab(city) for city in unique_cities}
48
- for city, tab in tab_dict.items():
49
  with tab:
50
  # Sliders for parameter adjustment, using session state values as defaults
51
  trend = st.select_slider('Select Trend', options=['add', 'mul', None], value=st.session_state.best_params['trend'])
@@ -91,4 +91,4 @@ for city, tab in tab_dict.items():
91
  if st.button(f'Export {city} to Excel'):
92
  df_to_export = forecast_df
93
  excel_data = to_excel(df_to_export)
94
- st.download_button(label='πŸ“₯ Download Excel', data=excel_data, file_name=f'{city}_forecast.xlsx', mime='application/vnd.ms-excel')
 
44
  unique_cities = data['City'].unique()
45
 
46
  # Creating tabs for each city
47
+ tabs = st.tabs(unique_cities)
48
+ for tab, city in zip(tabs, unique_cities):
49
  with tab:
50
  # Sliders for parameter adjustment, using session state values as defaults
51
  trend = st.select_slider('Select Trend', options=['add', 'mul', None], value=st.session_state.best_params['trend'])
 
91
  if st.button(f'Export {city} to Excel'):
92
  df_to_export = forecast_df
93
  excel_data = to_excel(df_to_export)
94
+ st.download_button(label='πŸ“₯ Download Excel', data=excel_data, file_name=f'{city}_forecast.xlsx', mime='application/vnd.ms-excel')