Spaces:
Running
Running
James McCool
commited on
Commit
·
25e92b8
1
Parent(s):
6a9b6c3
some more optimals resets and added color coding
Browse files
app.py
CHANGED
@@ -268,6 +268,7 @@ with tab2:
|
|
268 |
)
|
269 |
|
270 |
with col2:
|
|
|
271 |
if site_var1 == 'Draftkings':
|
272 |
if 'working_seed' in st.session_state:
|
273 |
st.session_state.working_seed = st.session_state.working_seed
|
@@ -311,5 +312,12 @@ with tab2:
|
|
311 |
st.session_state.data_export_display = pd.DataFrame(st.session_state.working_seed[0:151], columns=column_names)
|
312 |
|
313 |
with st.container():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
if 'data_export_display' in st.session_state:
|
315 |
-
st.dataframe(st.session_state.data_export_display.style.format(precision=2), use_container_width = True)
|
|
|
268 |
)
|
269 |
|
270 |
with col2:
|
271 |
+
|
272 |
if site_var1 == 'Draftkings':
|
273 |
if 'working_seed' in st.session_state:
|
274 |
st.session_state.working_seed = st.session_state.working_seed
|
|
|
312 |
st.session_state.data_export_display = pd.DataFrame(st.session_state.working_seed[0:151], columns=column_names)
|
313 |
|
314 |
with st.container():
|
315 |
+
if st.button("Reset Optimals", key='reset3'):
|
316 |
+
for key in st.session_state.keys():
|
317 |
+
del st.session_state[key]
|
318 |
+
if site_var1 == 'Draftkings':
|
319 |
+
st.session_state.working_seed = dk_lineups.copy()
|
320 |
+
elif site_var1 == 'Fanduel':
|
321 |
+
st.session_state.working_seed = fd_lineups.copy()
|
322 |
if 'data_export_display' in st.session_state:
|
323 |
+
st.dataframe(st.session_state.data_export_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height=1000, use_container_width = True)
|