James McCool commited on
Commit
5b0b8e1
·
1 Parent(s): 183e980

Add additional columns in app.py for updating Seasonal and Weekly Guillotine Rankings, enhancing user interaction and functionality in the rankings update section.

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -43,7 +43,7 @@ tab1, tab2, tab3, tab4, tab5 = st.tabs(['Rankings Update', 'Projections Update',
43
 
44
  with tab1:
45
  with st.container():
46
- col1, col2 = st.columns([3, 3])
47
 
48
  with col1:
49
  st.info("Update Seasonal Rankings")
@@ -61,6 +61,24 @@ with tab1:
61
  response = requests.post(f"https://api.fantasylife.com/api/expert-rankings/v1/{choose_ranker}/weekly/update", headers=headers)
62
  if response.status_code == 200:
63
  st.write("Uploading!")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
 
66
  with tab2:
 
43
 
44
  with tab1:
45
  with st.container():
46
+ col1, col2, col3, col4 = st.columns([3, 3, 3, 3])
47
 
48
  with col1:
49
  st.info("Update Seasonal Rankings")
 
61
  response = requests.post(f"https://api.fantasylife.com/api/expert-rankings/v1/{choose_ranker}/weekly/update", headers=headers)
62
  if response.status_code == 200:
63
  st.write("Uploading!")
64
+
65
+ with col3:
66
+ st.info("Update Seasonal Guillotine Rankings")
67
+ choose_ranker = st.selectbox("Choose Ranker", name_options, key='weekly_ranker')
68
+ choose_ranker = api_replace_options[name_options.index(choose_ranker)]
69
+ if st.button("Update Seasonal Guillotine Rankings", key='seasonal_guillotine_rankings'):
70
+ response = requests.post(f"https://api.fantasylife.com/api/guillotine-rankings/v1/{choose_ranker}/seasonal/update", headers=headers)
71
+ if response.status_code == 200:
72
+ st.write("Uploading!")
73
+
74
+ with col3:
75
+ st.info("Update Weekly Guillotine Rankings")
76
+ choose_ranker = st.selectbox("Choose Ranker", name_options, key='weekly_ranker')
77
+ choose_ranker = api_replace_options[name_options.index(choose_ranker)]
78
+ if st.button("Update Weekly Guillotine Rankings", key='weekly_guillotine_rankings'):
79
+ response = requests.post(f"https://api.fantasylife.com/api/guillotine-rankings/v1/{choose_ranker}/weekly/update", headers=headers)
80
+ if response.status_code == 200:
81
+ st.write("Uploading!")
82
 
83
 
84
  with tab2: