Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,7 @@ MLB_Data = 'https://docs.google.com/spreadsheets/d/1f42Ergav8K1VsOLOK9MUn7DM_MLM
|
|
| 43 |
|
| 44 |
percentages_format = {'Exposure': '{:.2%}'}
|
| 45 |
|
| 46 |
-
@st.
|
| 47 |
def init_baselines():
|
| 48 |
sh = gcservice_account.open_by_url(MLB_Data)
|
| 49 |
collection = db["DK_MLB_seed_frame"]
|
|
@@ -136,7 +136,7 @@ with tab1:
|
|
| 136 |
if 'data_export' in st.session_state:
|
| 137 |
st.download_button(
|
| 138 |
label="Export optimals set",
|
| 139 |
-
data=st.session_state.
|
| 140 |
file_name='MLB_optimals_export.csv',
|
| 141 |
mime='text/csv',
|
| 142 |
)
|
|
|
|
| 43 |
|
| 44 |
percentages_format = {'Exposure': '{:.2%}'}
|
| 45 |
|
| 46 |
+
@st.cache_data(ttl = 600)
|
| 47 |
def init_baselines():
|
| 48 |
sh = gcservice_account.open_by_url(MLB_Data)
|
| 49 |
collection = db["DK_MLB_seed_frame"]
|
|
|
|
| 136 |
if 'data_export' in st.session_state:
|
| 137 |
st.download_button(
|
| 138 |
label="Export optimals set",
|
| 139 |
+
data=st.session_state.data_export.to_csv().encode('utf-8'),
|
| 140 |
file_name='MLB_optimals_export.csv',
|
| 141 |
mime='text/csv',
|
| 142 |
)
|