Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
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
|