Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,40 +131,30 @@ with tab1:
|
|
| 131 |
stack_var2 = [4, 3, 2, 1, 0]
|
| 132 |
|
| 133 |
with col2:
|
| 134 |
-
if
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
st.session_state.
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
st.
|
| 158 |
-
st.session_state.data_export_display = st.session_state.data_export_display.copy()
|
| 159 |
-
|
| 160 |
-
# st.session_state.data_export_freq = calculate_value_frequencies(st.session_state.data_export)
|
| 161 |
-
|
| 162 |
-
with st.container():
|
| 163 |
-
if 'data_export_display' in st.session_state:
|
| 164 |
-
st.dataframe(st.session_state.data_export_display.style.format(precision=2), height=500, use_container_width=True)
|
| 165 |
-
with st.container():
|
| 166 |
-
if 'data_export_freq' in st.session_state:
|
| 167 |
-
st.dataframe(st.session_state.data_export_freq.style.format(percentages_format, precision=2), height=500, use_container_width=True)
|
| 168 |
|
| 169 |
if st.button("Prepare data export", key='data_export'):
|
| 170 |
st.session_state.data_export = st.session_state.working_seed.copy()
|
|
|
|
| 131 |
stack_var2 = [4, 3, 2, 1, 0]
|
| 132 |
|
| 133 |
with col2:
|
| 134 |
+
if site_var1 == 'Draftkings':
|
| 135 |
+
|
| 136 |
+
st.session_state.working_seed = DK_seed.copy()
|
| 137 |
+
st.session_state.working_seed = st.session_state.working_seed[np.isin(st.session_state.working_seed[:, 2], team_var2)]
|
| 138 |
+
st.session_state.working_seed = st.session_state.working_seed[np.isin(st.session_state.working_seed[:, 3], stack_var2)]
|
| 139 |
+
st.session_state.data_export_display = pd.DataFrame(st.session_state.working_seed[0:1000], columns=column_names)
|
| 140 |
+
|
| 141 |
+
# st.session_state.data_export_freq = calculate_value_frequencies(st.session_state.data_export)
|
| 142 |
+
|
| 143 |
+
elif site_var1 == 'Fanduel':
|
| 144 |
+
|
| 145 |
+
st.session_state.working_seed = FD_seed.copy()
|
| 146 |
+
st.session_state.working_seed = st.session_state.working_seed[np.isin(st.session_state.working_seed[:, 2], team_var2)]
|
| 147 |
+
st.session_state.working_seed = st.session_state.working_seed[np.isin(st.session_state.working_seed[:, 3], stack_var2)]
|
| 148 |
+
st.session_state.data_export_display = pd.DataFrame(st.session_state.working_seed[0:1000], columns=column_names)
|
| 149 |
+
|
| 150 |
+
# st.session_state.data_export_freq = calculate_value_frequencies(st.session_state.data_export)
|
| 151 |
+
|
| 152 |
+
with st.container():
|
| 153 |
+
if 'data_export_display' in st.session_state:
|
| 154 |
+
st.dataframe(st.session_state.data_export_display.style.format(precision=2), height=500, use_container_width=True)
|
| 155 |
+
with st.container():
|
| 156 |
+
if 'data_export_freq' in st.session_state:
|
| 157 |
+
st.dataframe(st.session_state.data_export_freq.style.format(percentages_format, precision=2), height=500, use_container_width=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
if st.button("Prepare data export", key='data_export'):
|
| 160 |
st.session_state.data_export = st.session_state.working_seed.copy()
|