James McCool commited on
Commit
c11ed09
·
1 Parent(s): 0c0ffea

Refactor data loading logic in Streamlit app by replacing expander with a container for improved layout. Simplify data reset functionality and ensure session state is cleared effectively.

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -76,11 +76,10 @@ proj_raw = init_stat_load()
76
  col1, col2 = st.columns([1, 5])
77
 
78
  with col1:
79
- with st.expander("Info and Filters"):
80
  if st.button("Load/Reset Data", key='reset1'):
81
  st.cache_data.clear()
82
- proj_raw, timestamp = init_stat_load()
83
- t_stamp = f"Last Update: " + str(timestamp) + f" CST"
84
  for key in st.session_state.keys():
85
  del st.session_state[key]
86
  site_var1 = st.radio("What site are you working with?", ('Draftkings', 'Fanduel'), key='site_var1')
 
76
  col1, col2 = st.columns([1, 5])
77
 
78
  with col1:
79
+ with st.container():
80
  if st.button("Load/Reset Data", key='reset1'):
81
  st.cache_data.clear()
82
+ proj_raw = init_stat_load()
 
83
  for key in st.session_state.keys():
84
  del st.session_state[key]
85
  site_var1 = st.radio("What site are you working with?", ('Draftkings', 'Fanduel'), key='site_var1')