Spaces:
Running
Running
Commit ·
75d7643
1
Parent(s): b02f184
Fix start and end date for player and team leaderboards
Browse files
player_team_leaderboard.py
CHANGED
|
@@ -147,9 +147,9 @@ def create_player_team_leaderboard_app(player_team_type):
|
|
| 147 |
return [create_df_value(cols) for cols in theme_to_cols.values()]
|
| 148 |
|
| 149 |
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
end_datetime_init = now
|
| 153 |
with gr.Blocks() as app:
|
| 154 |
gr.Markdown(f'# {player_team_type.title()} Leaderboard')
|
| 155 |
with gr.Row():
|
|
|
|
| 147 |
return [create_df_value(cols) for cols in theme_to_cols.values()]
|
| 148 |
|
| 149 |
|
| 150 |
+
start_datetime_init = datetime(data_df['season'].max(), 1, 1)
|
| 151 |
+
max_date = data_df['date'].max()
|
| 152 |
+
end_datetime_init = min(datetime.now(), datetime(max_date.year, max_date.month, max_date.day))
|
| 153 |
with gr.Blocks() as app:
|
| 154 |
gr.Markdown(f'# {player_team_type.title()} Leaderboard')
|
| 155 |
with gr.Row():
|