Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
9b31155
1
Parent(s):
586a577
Fixed removal of DK/FD option for some reason
Browse files
app.py
CHANGED
|
@@ -69,14 +69,14 @@ def init_DK_seed_frames():
|
|
| 69 |
@st.cache_data(ttl = 599)
|
| 70 |
def init_FD_seed_frames():
|
| 71 |
|
| 72 |
-
collection = db["
|
| 73 |
cursor = collection.find()
|
| 74 |
|
| 75 |
raw_display = pd.DataFrame(list(cursor))
|
| 76 |
raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
|
| 77 |
-
|
| 78 |
|
| 79 |
-
return
|
| 80 |
|
| 81 |
@st.cache_data(ttl = 599)
|
| 82 |
def init_baselines():
|
|
@@ -253,8 +253,13 @@ with tab1:
|
|
| 253 |
FD_seed = init_FD_seed_frames()
|
| 254 |
dk_raw, fd_raw = init_baselines()
|
| 255 |
sim_slate_var1 = st.radio("Which data are you loading?", ('Main Slate', 'Other Main Slate'), key='sim_slate_var1')
|
| 256 |
-
|
| 257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
|
| 259 |
contest_var1 = st.selectbox("What contest size are you simulating?", ('Small', 'Medium', 'Large', 'Custom'))
|
| 260 |
if contest_var1 == 'Small':
|
|
|
|
| 69 |
@st.cache_data(ttl = 599)
|
| 70 |
def init_FD_seed_frames():
|
| 71 |
|
| 72 |
+
collection = db["FD_NFL_seed_frame"]
|
| 73 |
cursor = collection.find()
|
| 74 |
|
| 75 |
raw_display = pd.DataFrame(list(cursor))
|
| 76 |
raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
|
| 77 |
+
FD_seed = raw_display.to_numpy()
|
| 78 |
|
| 79 |
+
return FD_seed
|
| 80 |
|
| 81 |
@st.cache_data(ttl = 599)
|
| 82 |
def init_baselines():
|
|
|
|
| 253 |
FD_seed = init_FD_seed_frames()
|
| 254 |
dk_raw, fd_raw = init_baselines()
|
| 255 |
sim_slate_var1 = st.radio("Which data are you loading?", ('Main Slate', 'Other Main Slate'), key='sim_slate_var1')
|
| 256 |
+
sim_site_var1 = st.radio("What site are you working with?", ('Draftkings', 'Fanduel'), key='sim_site_var1')
|
| 257 |
+
if sim_slate_var1 == 'Main Slate':
|
| 258 |
+
raw_baselines = dk_raw
|
| 259 |
+
column_names = dk_columns
|
| 260 |
+
elif sim_slate_var1 == 'Other Main Slate':
|
| 261 |
+
raw_baselines = fd_raw
|
| 262 |
+
column_names = fd_columns
|
| 263 |
|
| 264 |
contest_var1 = st.selectbox("What contest size are you simulating?", ('Small', 'Medium', 'Large', 'Custom'))
|
| 265 |
if contest_var1 == 'Small':
|