xtlyxt commited on
Commit
bb465b6
·
verified ·
1 Parent(s): a24e27f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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}", use_
 
 
 
 
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