gaur3009 commited on
Commit
0b87ee4
·
verified ·
1 Parent(s): 96bac99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -58,7 +58,13 @@ def plot_features(y, sr, mfcc, delta, delta2):
58
  return fig
59
 
60
  def process(audio):
 
 
 
61
  sr, y = audio
 
 
 
62
  y = y.astype(np.float32)
63
 
64
  # Lowpass filter
 
58
  return fig
59
 
60
  def process(audio):
61
+ if audio is None:
62
+ return "No audio provided.", plt.figure()
63
+
64
  sr, y = audio
65
+ if y is None:
66
+ return "Audio data is empty.", plt.figure()
67
+
68
  y = y.astype(np.float32)
69
 
70
  # Lowpass filter