James McCool commited on
Commit
cefd40a
·
1 Parent(s): bbf380a

Enhance user interface in app.py: add a fourth column for game type selection, reorganize input fields for site, sport, contest size, and field strength, and improve layout for better user interaction and clarity.

Browse files
Files changed (1) hide show
  1. app.py +17 -10
app.py CHANGED
@@ -28,20 +28,18 @@ player_right_names_mlb = ['Kike Hernandez']
28
 
29
  with st.container():
30
 
31
- col1, col2, col3 = st.columns(3)
32
  with col1:
33
- site_var = st.selectbox("Select Site", ['Draftkings', 'Fanduel'])
34
-
35
  if st.button('Clear data', key='reset3'):
36
  st.session_state.clear()
37
-
38
  with col2:
39
- sport_var = st.selectbox("Select Sport", ['NFL', 'MLB', 'NBA', 'NHL', 'MMA', 'CS2', 'TENNIS', 'GOLF'])
40
- type_var = st.selectbox("Select Game Type", ['Classic', 'Showdown'])
41
 
42
  with col3:
43
- Contest_Size = st.number_input("Enter Contest Size", value=25000, min_value=1, step=1)
44
- strength_var = st.selectbox("Select field strength", ['Average', 'Sharp', 'Weak'])
 
 
45
 
46
  tab1, tab2 = st.tabs(["Data Load", "Manage Portfolio"])
47
  with tab1:
@@ -781,8 +779,17 @@ with tab1:
781
 
782
  with tab2:
783
  if 'portfolio' in st.session_state and 'projections_df' in st.session_state:
784
- if st.button('Reset Portfolio', key='reset_port'):
785
- del st.session_state['working_frame']
 
 
 
 
 
 
 
 
 
786
 
787
  excluded_cols = ['salary', 'median', 'Own', 'Finish_percentile', 'Dupes', 'Stack', 'Win%', 'Lineup Edge', 'Weighted Own', 'Geomean']
788
 
 
28
 
29
  with st.container():
30
 
31
+ col1, col2, col3, col4 = st.columns(4)
32
  with col1:
 
 
33
  if st.button('Clear data', key='reset3'):
34
  st.session_state.clear()
 
35
  with col2:
36
+ site_var = st.selectbox("Select Site", ['Draftkings', 'Fanduel'])
 
37
 
38
  with col3:
39
+ sport_var = st.selectbox("Select Sport", ['NFL', 'MLB', 'NBA', 'NHL', 'MMA', 'CS2', 'TENNIS', 'GOLF'])
40
+
41
+ with col4:
42
+ type_var = st.selectbox("Select Game Type", ['Classic', 'Showdown'])
43
 
44
  tab1, tab2 = st.tabs(["Data Load", "Manage Portfolio"])
45
  with tab1:
 
779
 
780
  with tab2:
781
  if 'portfolio' in st.session_state and 'projections_df' in st.session_state:
782
+ with st.container():
783
+ col1, col2, col3 = st.columns(3)
784
+ with col1:
785
+ if st.button('Reset Portfolio', key='reset_port'):
786
+ del st.session_state['working_frame']
787
+
788
+ with col2:
789
+ Contest_Size = st.number_input("Enter Contest Size", value=25000, min_value=1, step=1)
790
+
791
+ with col3:
792
+ strength_var = st.selectbox("Select field strength", ['Average', 'Sharp', 'Weak'])
793
 
794
  excluded_cols = ['salary', 'median', 'Own', 'Finish_percentile', 'Dupes', 'Stack', 'Win%', 'Lineup Edge', 'Weighted Own', 'Geomean']
795