James McCool commited on
Commit
33960f1
·
1 Parent(s): 38da73d

Refactor stacking options in app.py for GPP contests to streamline user input by removing conditional checks for manual selection.

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -150,20 +150,18 @@ with tab1:
150
  if contest_var1 == 'Small Field GPP':
151
  st.info('The Pivot optimal uses backend functions to create a stack and lock in certain pieces, if you want control over QB pairing use the Manual model instead.')
152
  opto_var1 = st.selectbox("Pivot optimal or Manual?", ('Pivot Optimal', 'Manual'), key='opto_var1')
153
- if opto_var1 == "Manual":
154
- stack_var1 = st.selectbox('Which teams are you stacking?', options = raw_baselines['Team'].unique(), key='stack_var1')
155
- opp_var1 = opp_dict[stack_var1]
156
- qbstack_var1 = st.selectbox('How many forced WR/TE stacked with QB?', options = [1, 2], key='qbstack_var1')
157
- ministack_var1 = st.selectbox('How many forced bring backs?', options = [0, 1, 2], key='ministack_var1')
158
 
159
  elif contest_var1 == 'Large Field GPP':
160
  st.info('The Pivot optimal uses backend functions to create a stack and lock in certain pieces, if you want control over QB pairing use the Manual model instead.')
161
  opto_var1 = st.selectbox("Pivot optimal or Manual?", ('Pivot Optimal', 'Manual'), key='opto_var1')
162
- if opto_var1 == "Manual":
163
- stack_var1 = st.selectbox('Which team are you stacking?', options = raw_baselines['Team'].unique(), key='stack_var1')
164
- opp_var1 = opp_dict[stack_var1]
165
- qbstack_var1 = st.selectbox('How many forced WR/TE stacked with QB?', options = [1, 2], key='qbstack_var1')
166
- ministack_var1 = st.selectbox('How many forced bring backs?', options = [0, 1, 2], key='ministack_var1')
167
 
168
  elif contest_var1 == 'Round Robin':
169
  st.info('A Round Robin optimization will run a single optimal for all the teams on the slate based on your stacking inputs')
 
150
  if contest_var1 == 'Small Field GPP':
151
  st.info('The Pivot optimal uses backend functions to create a stack and lock in certain pieces, if you want control over QB pairing use the Manual model instead.')
152
  opto_var1 = st.selectbox("Pivot optimal or Manual?", ('Pivot Optimal', 'Manual'), key='opto_var1')
153
+ stack_var1 = st.selectbox('Which teams are you stacking?', options = raw_baselines['Team'].unique(), key='stack_var1')
154
+ opp_var1 = opp_dict[stack_var1]
155
+ qbstack_var1 = st.selectbox('How many forced WR/TE stacked with QB?', options = [1, 2], key='qbstack_var1')
156
+ ministack_var1 = st.selectbox('How many forced bring backs?', options = [0, 1, 2], key='ministack_var1')
 
157
 
158
  elif contest_var1 == 'Large Field GPP':
159
  st.info('The Pivot optimal uses backend functions to create a stack and lock in certain pieces, if you want control over QB pairing use the Manual model instead.')
160
  opto_var1 = st.selectbox("Pivot optimal or Manual?", ('Pivot Optimal', 'Manual'), key='opto_var1')
161
+ stack_var1 = st.selectbox('Which team are you stacking?', options = raw_baselines['Team'].unique(), key='stack_var1')
162
+ opp_var1 = opp_dict[stack_var1]
163
+ qbstack_var1 = st.selectbox('How many forced WR/TE stacked with QB?', options = [1, 2], key='qbstack_var1')
164
+ ministack_var1 = st.selectbox('How many forced bring backs?', options = [0, 1, 2], key='ministack_var1')
 
165
 
166
  elif contest_var1 == 'Round Robin':
167
  st.info('A Round Robin optimization will run a single optimal for all the teams on the slate based on your stacking inputs')