James McCool commited on
Commit
a700b26
·
1 Parent(s): 82d70c9

Add segmented control for tab selection in app.py to enhance navigation between 'Data Load' and 'Manage Portfolio' sections.

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -71,6 +71,15 @@ st.markdown("""
71
 
72
  </style>""", unsafe_allow_html=True)
73
 
 
 
 
 
 
 
 
 
 
74
  def create_position_export_dict(column_name, csv_file, site_var, type_var, sport_var):
75
  try:
76
  # Remove any numbers from the column name to get the position
@@ -180,16 +189,6 @@ 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',
187
- default='Data Load',
188
- width='content',
189
- label_visibility='collapsed',
190
- key='tab_selector'
191
- )
192
-
193
  if selected_tab == 'Data Load':
194
  if st.button('Clear data', key='reset1'):
195
  st.session_state.clear()
 
71
 
72
  </style>""", unsafe_allow_html=True)
73
 
74
+ selected_tab = st.segmented_control(
75
+ "Select Tab",
76
+ options=["Data Load", "Manage Portfolio"],
77
+ selection_mode='single',
78
+ default='Data Load',
79
+ label_visibility='collapsed',
80
+ key='tab_selector'
81
+ )
82
+
83
  def create_position_export_dict(column_name, csv_file, site_var, type_var, sport_var):
84
  try:
85
  # Remove any numbers from the column name to get the position
 
189
  elif type_var == 'Showdown':
190
  salary_max = 60000
191
 
 
 
 
 
 
 
 
 
 
 
192
  if selected_tab == 'Data Load':
193
  if st.button('Clear data', key='reset1'):
194
  st.session_state.clear()