Update README.md

This commit is contained in:
harshit katyal 2021-12-12 20:53:33 +00:00 committed by huggingface-web
parent 696c23195e
commit 7fd191edd9
1 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ import pandas as pd
~~~
~~~
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model_name_or_path = "Bagus/wav2vec2-xlsr-greek-speech-emotion-recognition"
model_name_or_path = "harshit345/xlsr-wav2vec-speech-emotion-recognition"
config = AutoConfig.from_pretrained(model_name_or_path)
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_name_or_path)
sampling_rate = feature_extractor.sampling_rate
@ -59,10 +59,10 @@ path = '/data/jtes_v1.1/wav/f01/ang/f01_ang_01.wav'
outputs = predict(path, sampling_rate)
~~~
~~~
[{'Emotion': 'anger', 'Score': '98.3%'},
{'Emotion': 'disgust', 'Score': '0.0%'},
{'Emotion': 'fear', 'Score': '0.4%'},
{'Emotion': 'happiness', 'Score': '0.7%'},
[{'Emotion': 'anger', 'Score': '78.3%'},
{'Emotion': 'disgust', 'Score': '11.7%'},
{'Emotion': 'fear', 'Score': '5.4%'},
{'Emotion': 'happiness', 'Score': '4.1%'},
{'Emotion': 'sadness', 'Score': '0.5%'}]
~~~