Dpngtm commited on
Commit
7b4cf33
·
verified ·
1 Parent(s): f24ec85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,9 +61,9 @@ def recognize_emotion(audio):
61
  logits = outputs.logits
62
  probs = F.softmax(logits, dim=-1)[0].cpu().numpy()
63
 
64
- # Convert probabilities to percentages and format results
65
  confidence_scores = {
66
- f"{emotion} {emotion_icons[emotion]}": round(float(prob * 100), 2)
67
  for emotion, prob in zip(emotion_labels, probs)
68
  }
69
 
 
61
  logits = outputs.logits
62
  probs = F.softmax(logits, dim=-1)[0].cpu().numpy()
63
 
64
+ # Prepare the confidence scores without converting to percentages
65
  confidence_scores = {
66
+ f"{emotion} {emotion_icons[emotion]}": float(prob)
67
  for emotion, prob in zip(emotion_labels, probs)
68
  }
69