Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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}")
|