Spaces:
Running
Running
James McCool
commited on
Commit
·
25917df
1
Parent(s):
33960f1
Refactor stacking options in app.py to conditionally display inputs based on user selection of 'Manual' for GPP contests, enhancing user experience and clarity.
Browse files
app.py
CHANGED
@@ -150,18 +150,20 @@ 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 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
|
|
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 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
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')
|
|
|
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')
|