Spaces:
Runtime error
Runtime error
fix: Bug fixed - earlier only 6 was getting predicted every time
Browse files
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 =
|
|
|
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 |
|