yashkens commited on
Commit
e334270
1 Parent(s): fa8f5a8

fix emotion classification

Browse files
Files changed (1) hide show
  1. emotions.py +1 -1
emotions.py CHANGED
@@ -7,7 +7,7 @@ classifier = pipeline("text-classification",
7
 
8
  def get_emotion(text='No text yet'):
9
  prediction = classifier(text)[0]
10
- result = sorted(prediction, key=lambda x: x['score'])
11
  return result
12
 
13
 
 
7
 
8
  def get_emotion(text='No text yet'):
9
  prediction = classifier(text)[0]
10
+ result = sorted(prediction, key=lambda x: x['score'])[::-1]
11
  return result
12
 
13