Update app.py
Browse files
app.py
CHANGED
@@ -133,19 +133,19 @@ def server(input, output, session):
|
|
133 |
df_spring = pl.read_parquet(f"hf://datasets/TJStatsApps/mlb_data/data/mlb_pitch_data_2025_spring.parquet")
|
134 |
|
135 |
|
136 |
-
date = (datetime.datetime.now() - datetime.timedelta(hours=8)).date()
|
137 |
-
print(datetime.datetime.now())
|
138 |
-
date_str = date.strftime('%Y-%m-%d')
|
139 |
-
# Initialize the scraper
|
140 |
|
141 |
|
142 |
-
game_list_input = (scraper.get_schedule(year_input=[int(date_str[0:4])], sport_id=[1], game_type=['S'])
|
143 |
-
|
144 |
|
145 |
-
data = scraper.get_data(game_list_input)
|
146 |
-
df = scraper.get_data_df(data)
|
147 |
|
148 |
-
df_spring = pl.concat([df_spring, df]).sort('game_date', descending=True)
|
149 |
|
150 |
return df_spring.filter(pl.col('start_speed')>0)
|
151 |
|
|
|
133 |
df_spring = pl.read_parquet(f"hf://datasets/TJStatsApps/mlb_data/data/mlb_pitch_data_2025_spring.parquet")
|
134 |
|
135 |
|
136 |
+
# date = (datetime.datetime.now() - datetime.timedelta(hours=8)).date()
|
137 |
+
# print(datetime.datetime.now())
|
138 |
+
# date_str = date.strftime('%Y-%m-%d')
|
139 |
+
# # Initialize the scraper
|
140 |
|
141 |
|
142 |
+
# game_list_input = (scraper.get_schedule(year_input=[int(date_str[0:4])], sport_id=[1], game_type=['S'])
|
143 |
+
# .filter(pl.col('date') == date)['game_id'])
|
144 |
|
145 |
+
# data = scraper.get_data(game_list_input)
|
146 |
+
# df = scraper.get_data_df(data)
|
147 |
|
148 |
+
# df_spring = pl.concat([df_spring, df]).sort('game_date', descending=True)
|
149 |
|
150 |
return df_spring.filter(pl.col('start_speed')>0)
|
151 |
|