James McCool
commited on
Commit
·
d57c3c2
1
Parent(s):
bf84db5
Adding button
Browse files
app.py
CHANGED
|
@@ -561,10 +561,19 @@ if selected_tab == 'Data Load':
|
|
| 561 |
|
| 562 |
upload_toggle = st.selectbox("What source are you uploading from?", options=['Paydirt DB', 'SaberSim (Just IDs)', 'Draftkings/Fanduel (Names + IDs)', 'Other (Just Names)'])
|
| 563 |
if upload_toggle == 'Paydirt DB':
|
| 564 |
-
if
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
|
| 569 |
elif upload_toggle == 'SaberSim (Just IDs)' or upload_toggle == 'Draftkings/Fanduel (Names + IDs)':
|
| 570 |
portfolio_file = st.file_uploader("Upload Portfolio File (CSV or Excel)", type=['csv', 'xlsx', 'xls'])
|
|
@@ -579,7 +588,7 @@ if selected_tab == 'Data Load':
|
|
| 579 |
del st.session_state['portfolio']
|
| 580 |
if 'export_portfolio' in st.session_state:
|
| 581 |
del st.session_state['export_portfolio']
|
| 582 |
-
|
| 583 |
if 'portfolio' not in st.session_state:
|
| 584 |
if portfolio_file:
|
| 585 |
if upload_toggle == 'SaberSim (Just IDs)':
|
|
|
|
| 561 |
|
| 562 |
upload_toggle = st.selectbox("What source are you uploading from?", options=['Paydirt DB', 'SaberSim (Just IDs)', 'Draftkings/Fanduel (Names + IDs)', 'Other (Just Names)'])
|
| 563 |
if upload_toggle == 'Paydirt DB':
|
| 564 |
+
if st.button("Load from Database after inserting site CSV"):
|
| 565 |
+
if site_var == 'Draftkings':
|
| 566 |
+
portfolio_file = init_DK_NFL_lineups(type_var, 'Main', 'proj', 50, dk_nfl_showdown_db_translation, 25000, [])
|
| 567 |
+
if 'portfolio' in st.session_state:
|
| 568 |
+
del st.session_state['portfolio']
|
| 569 |
+
if 'export_portfolio' in st.session_state:
|
| 570 |
+
del st.session_state['export_portfolio']
|
| 571 |
+
else:
|
| 572 |
+
portfolio_file = init_FD_NFL_lineups(type_var, 'Main', 'proj', 50, fd_nfl_showdown_db_translation, 25000, [])
|
| 573 |
+
if 'portfolio' in st.session_state:
|
| 574 |
+
del st.session_state['portfolio']
|
| 575 |
+
if 'export_portfolio' in st.session_state:
|
| 576 |
+
del st.session_state['export_portfolio']
|
| 577 |
|
| 578 |
elif upload_toggle == 'SaberSim (Just IDs)' or upload_toggle == 'Draftkings/Fanduel (Names + IDs)':
|
| 579 |
portfolio_file = st.file_uploader("Upload Portfolio File (CSV or Excel)", type=['csv', 'xlsx', 'xls'])
|
|
|
|
| 588 |
del st.session_state['portfolio']
|
| 589 |
if 'export_portfolio' in st.session_state:
|
| 590 |
del st.session_state['export_portfolio']
|
| 591 |
+
|
| 592 |
if 'portfolio' not in st.session_state:
|
| 593 |
if portfolio_file:
|
| 594 |
if upload_toggle == 'SaberSim (Just IDs)':
|