nesticot commited on
Commit
31a7164
·
verified ·
1 Parent(s): 14dfe7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -754,9 +754,14 @@ def server(input, output, session):
754
  prop=pl.col('is_pitch').sum().over("pitch_type")
755
  )
756
 
 
757
  except TypeError:
758
  print("NONE")
759
- return None
 
 
 
 
760
 
761
  if df is None:
762
  fig = plt.figure(figsize=(10, 10))
 
754
  prop=pl.col('is_pitch').sum().over("pitch_type")
755
  )
756
 
757
+
758
  except TypeError:
759
  print("NONE")
760
+ if df is None:
761
+ fig = plt.figure(figsize=(10, 10))
762
+ fig.text(x=0.1, y=0.9, s='No Statcast Data For This Pitcher', fontsize=24, ha='left')
763
+ return fig
764
+ # return None
765
 
766
  if df is None:
767
  fig = plt.figure(figsize=(10, 10))