Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,9 @@ classifier = pipeline(task="zero-shot-audio-classification", model="mskov/whispe
|
|
| 8 |
|
| 9 |
audio = "./candy-bar-chewing.wav"
|
| 10 |
labels = ["Sound of a dog", "Sound of vaccum cleaner", "chewing", "sneezing"]
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
predicted_label = result[0]["label"]
|
| 14 |
print(f"Predicted label: {predicted_label}")
|
|
|
|
| 8 |
|
| 9 |
audio = "./candy-bar-chewing.wav"
|
| 10 |
labels = ["Sound of a dog", "Sound of vaccum cleaner", "chewing", "sneezing"]
|
| 11 |
+
result = []
|
| 12 |
+
for item in labels:
|
| 13 |
+
result.append(classifier(audio, input_ids=labels))
|
| 14 |
|
| 15 |
predicted_label = result[0]["label"]
|
| 16 |
print(f"Predicted label: {predicted_label}")
|