James McCool commited on
Commit
a238471
·
1 Parent(s): 42503f5

Refactor app.py to streamline prop selection process and improve UI. Consolidated selection logic for game type and book options, enhancing clarity and reducing redundancy. Updated prop category selection based on game type, ensuring a more intuitive user experience.

Browse files
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -176,22 +176,20 @@ with tab3:
176
  game_select_var = st.selectbox('Select prop source', options = ['Aggregate', 'Pick6'])
177
  with col2:
178
  book_select_var = st.selectbox('Select book', options = ['ALL', 'BET_365', 'DRAFTKINGS', 'FANDUEL', 'MGM', 'UNIBET', 'WILLIAM_HILL'])
 
 
 
 
 
 
 
 
 
179
  with col3:
180
- prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_ASSISTS', 'NHL_GAME_PLAYER_BLOCKED_SHOTS'])
181
- if book_select_var == 'ALL':
182
- book_selections = ['BET_365', 'DRAFTKINGS', 'FANDUEL', 'MGM', 'UNIBET', 'WILLIAM_HILL']
183
- else:
184
- book_selections = [book_select_var]
185
- if game_select_var == 'Aggregate':
186
- prop_df = prop_trends[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type', 'Trending Over', 'Trending Under']]
187
- elif game_select_var == 'Pick6':
188
- prop_df = pick_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type', 'Trending Over', 'Trending Under']]
189
- book_selections = ['Pick6']
190
-
191
- if game_select_var == 'Aggregate':
192
- prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_ASSISTS', 'NHL_GAME_PLAYER_BLOCKED_SHOTS'])
193
- elif game_select_var == 'Pick6':
194
- prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'Points', 'Shots on Goal', 'Assists', 'Blocks'])
195
  with col4:
196
  st.download_button(
197
  label="Download Prop Source",
 
176
  game_select_var = st.selectbox('Select prop source', options = ['Aggregate', 'Pick6'])
177
  with col2:
178
  book_select_var = st.selectbox('Select book', options = ['ALL', 'BET_365', 'DRAFTKINGS', 'FANDUEL', 'MGM', 'UNIBET', 'WILLIAM_HILL'])
179
+ if book_select_var == 'ALL':
180
+ book_selections = ['BET_365', 'DRAFTKINGS', 'FANDUEL', 'MGM', 'UNIBET', 'WILLIAM_HILL']
181
+ else:
182
+ book_selections = [book_select_var]
183
+ if game_select_var == 'Aggregate':
184
+ prop_df = prop_trends[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type', 'Trending Over', 'Trending Under']]
185
+ elif game_select_var == 'Pick6':
186
+ prop_df = pick_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type', 'Trending Over', 'Trending Under']]
187
+ book_selections = ['Pick6']
188
  with col3:
189
+ if game_select_var == 'Aggregate':
190
+ prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_ASSISTS', 'NHL_GAME_PLAYER_BLOCKED_SHOTS'])
191
+ elif game_select_var == 'Pick6':
192
+ prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'Points', 'Shots on Goal', 'Assists', 'Blocks'])
 
 
 
 
 
 
 
 
 
 
 
193
  with col4:
194
  st.download_button(
195
  label="Download Prop Source",