James McCool commited on
Commit
2022d2c
·
1 Parent(s): 282bc3d

catch for HF version of segmented_control

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -180,7 +180,8 @@ with st.container():
180
  elif type_var == 'Showdown':
181
  salary_max = 60000
182
 
183
- selected_tab = st.segmented_control(
 
184
  "Select Tab",
185
  options=["Data Load", "Manage Portfolio"],
186
  selection_mode='single',
@@ -188,7 +189,16 @@ selected_tab = st.segmented_control(
188
  label_visibility='collapsed',
189
  width='stretch',
190
  key='tab_selector'
191
- )
 
 
 
 
 
 
 
 
 
192
 
193
  if selected_tab == 'Data Load':
194
  # Add file uploaders to your app
 
180
  elif type_var == 'Showdown':
181
  salary_max = 60000
182
 
183
+ try:
184
+ selected_tab = st.segmented_control(
185
  "Select Tab",
186
  options=["Data Load", "Manage Portfolio"],
187
  selection_mode='single',
 
189
  label_visibility='collapsed',
190
  width='stretch',
191
  key='tab_selector'
192
+ )
193
+ except:
194
+ selected_tab = st.segmented_control(
195
+ "Select Tab",
196
+ options=["Data Load", "Manage Portfolio"],
197
+ selection_mode='single',
198
+ default='Data Load',
199
+ label_visibility='collapsed',
200
+ key='tab_selector'
201
+ )
202
 
203
  if selected_tab == 'Data Load':
204
  # Add file uploaders to your app