Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,8 @@ import requests
|
|
3 |
|
4 |
st.set_page_config(layout="wide")
|
5 |
|
|
|
|
|
6 |
dwain_url = "https://www.fantasylife.com/api/projections/v1/nfl/dwain/season/update"
|
7 |
freedman_url = "https://www.fantasylife.com/api/projections/v1/nfl/freedman/season/update"
|
8 |
agg_url = "https://www.fantasylife.com/api/projections/v1/nfl/aggregate/season/update"
|
@@ -19,68 +21,84 @@ headers = {
|
|
19 |
'Authorization': 'Bearer 6984da1f-2c81-4140-8206-d018af38533f',
|
20 |
}
|
21 |
|
22 |
-
|
23 |
-
col1, col2, col3 = st.columns([3, 3, 3])
|
24 |
-
|
25 |
-
with col1:
|
26 |
-
st.info("Update Dwain's LIVE SITE FantasyLife Season Long Projections")
|
27 |
-
if st.button("Dwain Projection Update (Live Seasonal)", key='reset1'):
|
28 |
-
response = requests.post(dwain_url, headers=headers)
|
29 |
-
if response.status_code == 200:
|
30 |
-
st.write("Uploading!")
|
31 |
-
with col2:
|
32 |
-
st.info("Update Freedman's LIVE SITE FantasyLife Season Long Projections")
|
33 |
-
if st.button("Freedman Projection Update (Live Seasonal)", key='reset2'):
|
34 |
-
response = requests.post(freedman_url, headers=headers)
|
35 |
-
if response.status_code == 200:
|
36 |
-
st.write("Uploading!")
|
37 |
-
with col3:
|
38 |
-
st.info("Update the Aggregate LIVE SITE FantasyLife Season Long Projections")
|
39 |
-
if st.button("Aggregate Projection Update (Live Seasonal)", key='reset3'):
|
40 |
-
response = requests.post(agg_url, headers=headers)
|
41 |
-
if response.status_code == 200:
|
42 |
-
st.write("Uploading!")
|
43 |
|
44 |
-
with
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
65 |
|
66 |
-
with
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
if response.status_code == 200:
|
80 |
-
st.write("Uploading!")
|
81 |
-
with col3:
|
82 |
-
st.info("Update the Aggregate FantasyLife Weekly Projections")
|
83 |
-
if st.button("Aggregate Projection Update (Weekly)", key='reset9'):
|
84 |
-
response = requests.post(weekly_agg_url, headers=headers)
|
85 |
-
if response.status_code == 200:
|
86 |
-
st.write("Uploading!")
|
|
|
3 |
|
4 |
st.set_page_config(layout="wide")
|
5 |
|
6 |
+
traderater = "https://www.fantasylife.com/api/projections/v1/nfl/ratemytrade/season/update"
|
7 |
+
|
8 |
dwain_url = "https://www.fantasylife.com/api/projections/v1/nfl/dwain/season/update"
|
9 |
freedman_url = "https://www.fantasylife.com/api/projections/v1/nfl/freedman/season/update"
|
10 |
agg_url = "https://www.fantasylife.com/api/projections/v1/nfl/aggregate/season/update"
|
|
|
21 |
'Authorization': 'Bearer 6984da1f-2c81-4140-8206-d018af38533f',
|
22 |
}
|
23 |
|
24 |
+
tab1, tab2, tab3, tab4 = st.tabs(['Season Long (Live Site)', 'Season Long (Dev Site)', 'Weekly', 'Trade Rater'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
with tab1:
|
27 |
+
with st.container():
|
28 |
+
col1, col2, col3 = st.columns([3, 3, 3])
|
29 |
+
|
30 |
+
with col1:
|
31 |
+
st.info("Update Dwain's LIVE SITE FantasyLife Season Long Projections")
|
32 |
+
if st.button("Dwain Projection Update (Live Seasonal)", key='reset1'):
|
33 |
+
response = requests.post(dwain_url, headers=headers)
|
34 |
+
if response.status_code == 200:
|
35 |
+
st.write("Uploading!")
|
36 |
+
with col2:
|
37 |
+
st.info("Update Freedman's LIVE SITE FantasyLife Season Long Projections")
|
38 |
+
if st.button("Freedman Projection Update (Live Seasonal)", key='reset2'):
|
39 |
+
response = requests.post(freedman_url, headers=headers)
|
40 |
+
if response.status_code == 200:
|
41 |
+
st.write("Uploading!")
|
42 |
+
with col3:
|
43 |
+
st.info("Update the Aggregate LIVE SITE FantasyLife Season Long Projections")
|
44 |
+
if st.button("Aggregate Projection Update (Live Seasonal)", key='reset3'):
|
45 |
+
response = requests.post(agg_url, headers=headers)
|
46 |
+
if response.status_code == 200:
|
47 |
+
st.write("Uploading!")
|
48 |
|
49 |
+
with tab2:
|
50 |
+
with st.container():
|
51 |
+
col1, col2, col3 = st.columns([3, 3, 3])
|
52 |
+
|
53 |
+
with col1:
|
54 |
+
st.info("Update Dwain's DEV SITE FantasyLife Season Long Projections")
|
55 |
+
if st.button("Dwain Projection Update (Dev Seasonal)", key='reset4'):
|
56 |
+
response = requests.post(dev_dwain_url, headers=headers)
|
57 |
+
if response.status_code == 200:
|
58 |
+
st.write("Uploading!")
|
59 |
+
with col2:
|
60 |
+
st.info("Update Freedman's DEV SITE FantasyLife Season Long Projections")
|
61 |
+
if st.button("Freedman Projection Update (Dev Seasonal)", key='reset5'):
|
62 |
+
response = requests.post(dev_freedman_url, headers=headers)
|
63 |
+
if response.status_code == 200:
|
64 |
+
st.write("Uploading!")
|
65 |
+
with col3:
|
66 |
+
st.info("Update the Aggregate DEV SITE FantasyLife Season Long Projections")
|
67 |
+
if st.button("Aggregate Projection Update (Dev Seasonal)", key='reset6'):
|
68 |
+
response = requests.post(dev_agg_url, headers=headers)
|
69 |
+
if response.status_code == 200:
|
70 |
+
st.write("Uploading!")
|
71 |
|
72 |
+
with tab3:
|
73 |
+
with st.container():
|
74 |
+
col1, col2, col3 = st.columns([3, 3, 3])
|
75 |
+
|
76 |
+
with col1:
|
77 |
+
st.info("Update Dwain's FantasyLife Weekly Projections")
|
78 |
+
if st.button("Dwain Projection Update (Weekly)", key='reset7'):
|
79 |
+
response = requests.post(weekly_dwain_url, headers=headers)
|
80 |
+
if response.status_code == 200:
|
81 |
+
st.write("Uploading!")
|
82 |
+
with col2:
|
83 |
+
st.info("Update Freedman's FantasyLife Weekly Projections")
|
84 |
+
if st.button("Freedman Projection Update (Weekly)", key='reset8'):
|
85 |
+
response = requests.post(weekly_freedman_url, headers=headers)
|
86 |
+
if response.status_code == 200:
|
87 |
+
st.write("Uploading!")
|
88 |
+
with col3:
|
89 |
+
st.info("Update the Aggregate FantasyLife Weekly Projections")
|
90 |
+
if st.button("Aggregate Projection Update (Weekly)", key='reset9'):
|
91 |
+
response = requests.post(weekly_agg_url, headers=headers)
|
92 |
+
if response.status_code == 200:
|
93 |
+
st.write("Uploading!")
|
94 |
|
95 |
+
with tab4:
|
96 |
+
with st.container():
|
97 |
+
col1, col2, col3 = st.columns([3, 3, 3])
|
98 |
+
|
99 |
+
with col1:
|
100 |
+
st.info("Update FantasyLife Trade Rater")
|
101 |
+
if st.button("Projection Update (Trade Rater)", key='reset10'):
|
102 |
+
response = requests.post(traderater, headers=headers)
|
103 |
+
if response.status_code == 200:
|
104 |
+
st.write("Uploading!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|