DrishtiSharma commited on
Commit
c6ac9ff
1 Parent(s): fe02e39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ from transformers import pipeline
5
  Model_1 = "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD"
6
  Model_2 ="hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"
7
 
8
- def classify_sentiment(audio):
9
- pipe = pipeline("audio-classification", model="hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD")
10
  pred = pipe(audio)
11
  return {dic["label"]: dic["score"] for dic in pred}
12
 
 
5
  Model_1 = "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD"
6
  Model_2 ="hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"
7
 
8
+ def classify_sentiment(audio, model):
9
+ pipe = pipeline("audio-classification", model=model)
10
  pred = pipe(audio)
11
  return {dic["label"]: dic["score"] for dic in pred}
12