mskov commited on
Commit
07a3709
β€’
1 Parent(s): cea67c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,7 +7,8 @@ classifier = pipeline(task="zero-shot-audio-classification", model="mskov/whispe
7
  # classifier = pipeline(model="mskov/roberta-base-toxicity")
8
 
9
  audio = "./candy-bar-chewing.wav"
10
- classifier(audio, candidate_labels=["Sound of a dog", "Sound of vaccum cleaner", "chewing", "sneezing"])
 
11
 
12
  predicted_label = result[0]["label"]
13
  print(f"Predicted label: {predicted_label}")
 
7
  # classifier = pipeline(model="mskov/roberta-base-toxicity")
8
 
9
  audio = "./candy-bar-chewing.wav"
10
+ labels = ["Sound of a dog", "Sound of vaccum cleaner", "chewing", "sneezing"]
11
+ classifier(audio, input_ids=labels)
12
 
13
  predicted_label = result[0]["label"]
14
  print(f"Predicted label: {predicted_label}")