Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -58,4 +58,7 @@ if st.button("Predict Emotions") and selected_images:
|
|
58 |
for i, result in enumerate(results):
|
59 |
predicted_class = result[0]["label"]
|
60 |
predicted_emotion = predicted_class.split("_")[-1].capitalize()
|
61 |
-
st.image(selected_images[i], caption=f"Predicted emotion: {predicted_emotion}",
|
|
|
|
|
|
|
|
58 |
for i, result in enumerate(results):
|
59 |
predicted_class = result[0]["label"]
|
60 |
predicted_emotion = predicted_class.split("_")[-1].capitalize()
|
61 |
+
st.image(selected_images[i], caption=f"Predicted emotion: {predicted_emotion}", use_column_width=True)
|
62 |
+
st.write(f"Emotion Scores for #{i+1} Image")
|
63 |
+
st.write(f"{predicted_emotion}: {result[0]['score']:.4f}")
|
64 |
+
st.write(f"Original File Name: {selected_images[i].filename}") # Display original file name
|