James McCool commited on
Commit
d57c3c2
·
1 Parent(s): bf84db5

Adding button

Browse files
Files changed (1) hide show
  1. app.py +14 -5
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 site_var == 'Draftkings':
565
- portfolio_file = init_DK_NFL_lineups(type_var, 'Main Slate', 'proj', 50, dk_nfl_showdown_db_translation, 25000, [])
566
- else:
567
- portfolio_file = init_FD_NFL_lineups(type_var, 'Main Slate', 'proj', 50, fd_nfl_showdown_db_translation, 25000, [])
 
 
 
 
 
 
 
 
 
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)':