xtlyxt commited on
Commit
d3dabb5
·
verified ·
1 Parent(s): c03e6e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -37,14 +37,14 @@ if st.button("Predict Emotions") and uploaded_images:
37
  col.write(f"Emotion Scores: {predicted_emotion}: {results[i][0]['score']:.4f}")
38
  col.write(f"Original File Name: {file_names[i]}") # Display original file name
39
 
40
- # Display the keys and values of all results
41
- for i, result in enumerate(results):
42
- st.write(f"Keys and Values of results[{i}]:")
43
- for res in result:
44
- label = res["label"]
45
- score = res["score"]
46
- st.write(f"{label}: {score:.4f}")
47
-
48
 
49
  else:
50
  # Open the uploaded images
 
37
  col.write(f"Emotion Scores: {predicted_emotion}: {results[i][0]['score']:.4f}")
38
  col.write(f"Original File Name: {file_names[i]}") # Display original file name
39
 
40
+ # Display the keys and values of all results
41
+ st.write("Keys and Values of all results:")
42
+ for i, result in enumerate(results):
43
+ st.write(f"Keys and Values of results[{i}]:")
44
+ for res in result:
45
+ label = res["label"]
46
+ score = res["score"]
47
+ st.write(f"{label}: {score:.4f}")
48
 
49
  else:
50
  # Open the uploaded images