Multichem commited on
Commit
dd671e4
·
verified ·
1 Parent(s): bbf8853

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -16
app.py CHANGED
@@ -215,22 +215,29 @@ with tab2:
215
  # i.e. clear values from both square and cube
216
  st.cache_data.clear()
217
  roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
218
- league_choice2 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LEC'), key='league_var2')
219
- if league_choice2 == 'LCK/LPL':
220
- league_hold = roo_table[roo_table['league'] == 'LCK']
221
- elif league_choice2 == 'LCS':
222
- league_hold = roo_table[roo_table['league'] == 'LCS']
223
- elif league_choice2 == 'LEC':
224
- league_hold = roo_table[roo_table['league'] == 'LEC']
225
- model_choice = st.radio("What table would you like to display?", ('Overall', 'Wins', 'Losses'), key='roo_table')
226
- if model_choice == 'Overall':
227
- hold_display = league_hold[league_hold['type'] == 'Overall']
228
- elif model_choice == 'Wins':
229
- hold_display = league_hold[league_hold['type'] == 'Wins']
230
- elif model_choice == 'Losses':
231
- hold_display = league_hold[league_hold['type'] == 'Losses']
232
- pos_var1 = st.selectbox('View specific position?', options = ['All', 'TOP', 'JNG', 'MID', 'ADC', 'SUP'], key = 'roo_posvar')
233
- team_var1 = st.multiselect('View specific team?', options = hold_display['Team'].unique(), key = 'roo_teamvar')
 
 
 
 
 
 
 
234
  display = hold_display.set_index('Player')
235
  if team_var1:
236
  display = display[display['Team'].isin(team_var1)]
 
215
  # i.e. clear values from both square and cube
216
  st.cache_data.clear()
217
  roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
218
+ with st.container():
219
+ col1, col2, col3, col4 = st.columns([4, 2, 2, 2])
220
+
221
+ with col1:
222
+ league_choice2 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LEC'), key='league_var2')
223
+ if league_choice2 == 'LCK/LPL':
224
+ league_hold = roo_table[roo_table['league'] == 'LCK']
225
+ elif league_choice2 == 'LCS':
226
+ league_hold = roo_table[roo_table['league'] == 'LCS']
227
+ elif league_choice2 == 'LEC':
228
+ league_hold = roo_table[roo_table['league'] == 'LEC']
229
+ with col2:
230
+ model_choice = st.radio("What table would you like to display?", ('Overall', 'Wins', 'Losses'), key='roo_table')
231
+ if model_choice == 'Overall':
232
+ hold_display = league_hold[league_hold['type'] == 'Overall']
233
+ elif model_choice == 'Wins':
234
+ hold_display = league_hold[league_hold['type'] == 'Wins']
235
+ elif model_choice == 'Losses':
236
+ hold_display = league_hold[league_hold['type'] == 'Losses']
237
+ with col3:
238
+ pos_var1 = st.selectbox('View specific position?', options = ['All', 'TOP', 'JNG', 'MID', 'ADC', 'SUP'], key = 'roo_posvar')
239
+ with col4:
240
+ team_var1 = st.multiselect('View specific team?', options = hold_display['Team'].unique(), key = 'roo_teamvar')
241
  display = hold_display.set_index('Player')
242
  if team_var1:
243
  display = display[display['Team'].isin(team_var1)]