mskov commited on
Commit
0a7507f
Β·
1 Parent(s): 9c9f412

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,8 +6,8 @@ from transformers import pipeline
6
  classifier = pipeline(task="zero-shot-audio-classification", model="mskov/roberta-base-toxicity")
7
  classifier = pipeline(model="mskov/roberta-base-toxicity")
8
 
9
- text = "Kederis proclaims innocence Olympic champion Kostas Kederis today left hospital ahead of his date with IOC inquisitors claiming his innocence and vowing: quot;After the crucifixion comes the resurrection. quot; .."
10
- result = classifier(text)
11
 
12
  predicted_label = result[0]["label"]
13
  print(f"Predicted label: {predicted_label}")
 
6
  classifier = pipeline(task="zero-shot-audio-classification", model="mskov/roberta-base-toxicity")
7
  classifier = pipeline(model="mskov/roberta-base-toxicity")
8
 
9
+ audio = "./test/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}")