James McCool
commited on
Commit
·
5a42d4a
1
Parent(s):
771c8ac
Fix condition check for league baselines in hitter tab of Streamlit app
Browse files- Updated the condition to check if the selected table variable is in the list of league baseline options, ensuring correct functionality for data loading.
- This change improves the accuracy of the loading spinner display when accessing league aggregate data.
- src/streamlit_app.py +1 -1
src/streamlit_app.py
CHANGED
@@ -245,7 +245,7 @@ with hitter_tab:
|
|
245 |
hitter_disp_container = hitter_disp_container.empty()
|
246 |
|
247 |
with hitter_disp_container:
|
248 |
-
if table_var_hitter
|
249 |
with st.spinner("Full league baselines can take some time to load", show_time=True):
|
250 |
time.sleep(5)
|
251 |
st.dataframe(st.session_state['hitter_disp_frame'].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height = 750, use_container_width = True, hide_index = True)
|
|
|
245 |
hitter_disp_container = hitter_disp_container.empty()
|
246 |
|
247 |
with hitter_disp_container:
|
248 |
+
if table_var_hitter in (['League Aggregate Baselines', 'League Short Term Baselines', 'League Long Term Baselines']):
|
249 |
with st.spinner("Full league baselines can take some time to load", show_time=True):
|
250 |
time.sleep(5)
|
251 |
st.dataframe(st.session_state['hitter_disp_frame'].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height = 750, use_container_width = True, hide_index = True)
|