James McCool
commited on
Commit
·
aca3a9f
1
Parent(s):
8261cfd
Refactor sport and game type selection in app.py for improved clarity
Browse files- Changed session state assignments for sport and game type selections to local variables, enhancing code readability and maintainability.
- This update streamlines the selection process and prepares for potential future enhancements in user interaction.
app.py
CHANGED
|
@@ -185,8 +185,8 @@ if selected_tab == 'Data Load':
|
|
| 185 |
sport_options, date_options = st.columns(2)
|
| 186 |
parse_type = 'Manual'
|
| 187 |
with sport_options:
|
| 188 |
-
|
| 189 |
-
|
| 190 |
try:
|
| 191 |
contest_names, curr_info = grab_contest_names(db, st.session_state['sport_select'], st.session_state['type_var'])
|
| 192 |
except:
|
|
|
|
| 185 |
sport_options, date_options = st.columns(2)
|
| 186 |
parse_type = 'Manual'
|
| 187 |
with sport_options:
|
| 188 |
+
sport_select = st.selectbox("Select Sport", ['MLB', 'MMA', 'GOLF', 'NBA', 'NHL', 'WNBA', 'NAS'], key='sport_select')
|
| 189 |
+
type_var = st.selectbox("Select Game Type", ['Classic', 'Showdown'], key='type_var')
|
| 190 |
try:
|
| 191 |
contest_names, curr_info = grab_contest_names(db, st.session_state['sport_select'], st.session_state['type_var'])
|
| 192 |
except:
|