xtlyxt commited on
Commit
c4d5f50
·
verified ·
1 Parent(s): de3aa3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -40,3 +40,9 @@ if uploaded_image:
40
  predicted_emotion = emotion_labels[predicted_class]
41
 
42
  st.image(image, caption=f"Predicted emotion: {predicted_emotion}", use_column_width=True)
 
 
 
 
 
 
 
40
  predicted_emotion = emotion_labels[predicted_class]
41
 
42
  st.image(image, caption=f"Predicted emotion: {predicted_emotion}", use_column_width=True)
43
+
44
+
45
+ # Display scores for each category
46
+ st.write("Emotion Scores:")
47
+ for label, score in zip(emotion_labels, outputs.logits[0]):
48
+ st.write(f"{label}: {score:.4f}")