nesticot commited on
Commit
a4bf659
·
verified ·
1 Parent(s): ef43017

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -391,10 +391,6 @@ def server(input, output, session):
391
 
392
 
393
  df = cached_data()
394
- if df is None:
395
- fig = plt.figure(figsize=(10,10))
396
- fig.text(x=0.1,y=0.9,s='No Statcast Data For This Pitcher',fontsize=24,ha='left')
397
- return fig
398
 
399
  brushed_df = pl.DataFrame(brushed_points(
400
  df.to_pandas(),
@@ -605,8 +601,14 @@ def server(input, output, session):
605
  print(year_input, sport_id, player_input, start_date, end_date)
606
 
607
  df = cached_data()
 
 
 
 
608
  df = df.clone()
609
 
 
 
610
  p.set(0.6, "Creating plot...")
611
 
612
  # fig, ax = plt.subplots(figsize=(8, 8))
 
391
 
392
 
393
  df = cached_data()
 
 
 
 
394
 
395
  brushed_df = pl.DataFrame(brushed_points(
396
  df.to_pandas(),
 
601
  print(year_input, sport_id, player_input, start_date, end_date)
602
 
603
  df = cached_data()
604
+ if df is None:
605
+ fig = plt.figure(figsize=(10,10))
606
+ fig.text(x=0.1,y=0.9,s='No Statcast Data For This Pitcher',fontsize=24,ha='left')
607
+ return fig
608
  df = df.clone()
609
 
610
+
611
+
612
  p.set(0.6, "Creating plot...")
613
 
614
  # fig, ax = plt.subplots(figsize=(8, 8))