Update app.py
Browse files
app.py
CHANGED
@@ -245,6 +245,10 @@ if 'schedule_df' not in st.session_state:
|
|
245 |
if 'st.session_state.historical_data' not in st.session_state:
|
246 |
st.session_state.historical_data = None
|
247 |
|
|
|
|
|
|
|
|
|
248 |
if st.button("Generate Mock Historical Data"):
|
249 |
# Only generate historical data if it hasn’t been generated already
|
250 |
if st.session_state.historical_data is None:
|
|
|
245 |
if 'st.session_state.historical_data' not in st.session_state:
|
246 |
st.session_state.historical_data = None
|
247 |
|
248 |
+
if st.session_state.historical_data is None:
|
249 |
+
st.session_state.historical_data = generate_mock_historical_data(st.session_state.num_teams, st.session_state.num_conferences, st.session_state.num_inter_games, date(2022, 11, 6), date(2023, 3, 1))
|
250 |
+
st.session_state.historical_data['Date'] = pd.to_datetime(st.session_state.historical_data['Date'])
|
251 |
+
|
252 |
if st.button("Generate Mock Historical Data"):
|
253 |
# Only generate historical data if it hasn’t been generated already
|
254 |
if st.session_state.historical_data is None:
|