pksx01 commited on
Commit
63cf66c
·
1 Parent(s): 33b0769

fix: Bug fixed - earlier only 6 was getting predicted every time

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -19,7 +19,8 @@ def mel_spectrogram_tfm(file):
19
 
20
  def classify(audio):
21
  spec_db = mel_spectrogram_tfm(audio)
22
- img = PILImage.create(spec_db)
 
23
  pred, idx, prob = learn.predict(img)
24
  return dict(zip(categories, map(float, prob)))
25
 
 
19
 
20
  def classify(audio):
21
  spec_db = mel_spectrogram_tfm(audio)
22
+ img = 'tmp.png'
23
+ plt.imsave(img, spec_db)
24
  pred, idx, prob = learn.predict(img)
25
  return dict(zip(categories, map(float, prob)))
26