Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,11 +19,14 @@ dev_dwain_url = "https://fantasylife.dev.spotlightsportsb2b.com/api/projections/
|
|
19 |
dev_freedman_url = "https://fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/freedman/season/update"
|
20 |
dev_agg_url = "https://fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/aggregate/season/update"
|
21 |
|
|
|
|
|
|
|
22 |
headers = {
|
23 |
'Authorization': 'Bearer 6984da1f-2c81-4140-8206-d018af38533f',
|
24 |
}
|
25 |
|
26 |
-
tab1, tab2, tab3, tab4, tab5 = st.tabs(['Season Long (Live Site)', 'Season Long (Dev Site)', 'Weekly', 'Trade Rater', 'Purge FL API Hub Cache'])
|
27 |
|
28 |
with tab1:
|
29 |
with st.container():
|
@@ -101,23 +104,41 @@ with tab3:
|
|
101 |
st.write("Uploading!")
|
102 |
|
103 |
with tab4:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
with st.container():
|
105 |
col1, col2, col3 = st.columns([3, 3, 3])
|
106 |
|
107 |
with col1:
|
108 |
st.info("Update FantasyLife Trade Rater")
|
109 |
-
if st.button("Projection Update (Trade Rater)", key='
|
110 |
response = requests.post(traderater, headers=headers)
|
111 |
if response.status_code == 200:
|
112 |
st.write("Uploading!")
|
113 |
|
114 |
-
with
|
115 |
with st.container():
|
116 |
col1, col2, col3 = st.columns([3, 3, 3])
|
117 |
|
118 |
with col1:
|
119 |
st.info("Reset the API cache for the site")
|
120 |
-
if st.button("Reset Cache", key='
|
121 |
response = requests.post(purge_cache, headers=headers)
|
122 |
if response.status_code == 200:
|
123 |
st.write("Uploading!")
|
|
|
19 |
dev_freedman_url = "https://fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/freedman/season/update"
|
20 |
dev_agg_url = "https://fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/aggregate/season/update"
|
21 |
|
22 |
+
freedman_nfl_game_model = "https://www.fantasylife.com/api/projections/v1/nfl-odds/james/game/update"
|
23 |
+
thor_ncaaf_game_model = "https://www.fantasylife.com/api/projections/v1/ncaafb-odds/james/game/update"
|
24 |
+
|
25 |
headers = {
|
26 |
'Authorization': 'Bearer 6984da1f-2c81-4140-8206-d018af38533f',
|
27 |
}
|
28 |
|
29 |
+
tab1, tab2, tab3, tab4, tab5 = st.tabs(['Season Long (Live Site)', 'Season Long (Dev Site)', 'Weekly', 'Game Model', 'Trade Rater', 'Purge FL API Hub Cache'])
|
30 |
|
31 |
with tab1:
|
32 |
with st.container():
|
|
|
104 |
st.write("Uploading!")
|
105 |
|
106 |
with tab4:
|
107 |
+
with st.container():
|
108 |
+
col1, col2, col3 = st.columns([3, 3, 3])
|
109 |
+
|
110 |
+
with col1:
|
111 |
+
st.info("Update Freedman NFL Game Model")
|
112 |
+
if st.button("Update Freedman NFL Game Model (Weekly)", key='reset10'):
|
113 |
+
response = requests.post(freedman_nfl_game_model, headers=headers)
|
114 |
+
if response.status_code == 200:
|
115 |
+
st.write("Uploading!")
|
116 |
+
|
117 |
+
with col2:
|
118 |
+
st.info("Update Thor NCCAF Game Model")
|
119 |
+
if st.button("Update Thor NCCAF Game Model (Weekly)", key='reset11'):
|
120 |
+
response = requests.post(thor_ncaaf_game_model, headers=headers)
|
121 |
+
if response.status_code == 200:
|
122 |
+
st.write("Uploading!")
|
123 |
+
|
124 |
+
with tab5:
|
125 |
with st.container():
|
126 |
col1, col2, col3 = st.columns([3, 3, 3])
|
127 |
|
128 |
with col1:
|
129 |
st.info("Update FantasyLife Trade Rater")
|
130 |
+
if st.button("Projection Update (Trade Rater)", key='reset12'):
|
131 |
response = requests.post(traderater, headers=headers)
|
132 |
if response.status_code == 200:
|
133 |
st.write("Uploading!")
|
134 |
|
135 |
+
with tab6:
|
136 |
with st.container():
|
137 |
col1, col2, col3 = st.columns([3, 3, 3])
|
138 |
|
139 |
with col1:
|
140 |
st.info("Reset the API cache for the site")
|
141 |
+
if st.button("Reset Cache", key='reset13'):
|
142 |
response = requests.post(purge_cache, headers=headers)
|
143 |
if response.status_code == 200:
|
144 |
st.write("Uploading!")
|