Spaces:
Running
Running
File size: 994 Bytes
a8b6a3f d3fa801 a8b6a3f 2967b2a d3fa801 56c6bd4 a8b6a3f d3fa801 36c7a6c 9eda2f5 36c7a6c 9eda2f5 8fe9801 a8b6a3f 56c6bd4 2967b2a d3fa801 2967b2a 36c7a6c 9eda2f5 2967b2a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import gradio as gr
import matplotlib as mpl
from data import data_df
from pitcher_overview import create_pitcher_overview
from pitch_leaderboard import create_pitch_leaderboard
from daily_weekly_leaderboard import create_daily_weekly_leaderboard_app
from css import css
mpl.use('Agg')
latest_data_date = data_df['date'].max()
with open('updated.txt') as f:
updated = f.read().strip()
limitations = '''**General Limitations**
- As new players make their debut, some names may not be missing or translated/transliterated correctly.
'''
if __name__ == '__main__':
with gr.Blocks(css=css) as app:
with gr.Tab('Pitcher Overview'):
create_pitcher_overview(data_df)
with gr.Tab('Pitch Leaderboard'):
create_pitch_leaderboard()
with gr.Tab('Daily/Weekly Leaderboard'):
create_daily_weekly_leaderboard_app(data_df)
gr.Markdown(f'**Data up to:** {latest_data_date}')
gr.Markdown(f'**Last updated:** {updated}')
gr.Markdown(limitations)
app.launch()
|