Files changed (1) hide show
  1. README.md +2 -4
README.md CHANGED
@@ -10,8 +10,7 @@ tags:
10
 
11
  Working example of using pretrained model to predict emotion in local audio file
12
 
13
- ```
14
-
15
  def predict_emotion_hubert(audio_file):
16
  """ inspired by an example from https://github.com/m3hrdadfi/soxan """
17
  from audio_models import HubertForSpeechClassification
@@ -52,8 +51,7 @@ def predict_emotion_hubert(audio_file):
52
  return [row for row in sorted(outputs, key=lambda x:x["score"], reverse=True) if row['score'] != '0.0%'][:2]
53
  ```
54
 
55
- ```
56
-
57
  result = predict_emotion_hubert("male-crying.mp3")
58
  >>> result
59
  [{'emo': 'male_sad', 'score': 91.0}, {'emo': 'male_fear', 'score': 4.8}]
 
10
 
11
  Working example of using pretrained model to predict emotion in local audio file
12
 
13
+ ```python
 
14
  def predict_emotion_hubert(audio_file):
15
  """ inspired by an example from https://github.com/m3hrdadfi/soxan """
16
  from audio_models import HubertForSpeechClassification
 
51
  return [row for row in sorted(outputs, key=lambda x:x["score"], reverse=True) if row['score'] != '0.0%'][:2]
52
  ```
53
 
54
+ ```python
 
55
  result = predict_emotion_hubert("male-crying.mp3")
56
  >>> result
57
  [{'emo': 'male_sad', 'score': 91.0}, {'emo': 'male_fear', 'score': 4.8}]