xtlyxt commited on
Commit
ac8de0a
·
verified ·
1 Parent(s): 7b90a47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -23
app.py CHANGED
@@ -43,20 +43,7 @@ if st.button("Predict Emotions") and uploaded_images:
43
  # for key, value in result.items():
44
  # st.write(f"Key: {key}, Value: {value}")
45
 
46
-
47
-
48
-
49
- # Display the keys and values of all results
50
- st.write("Keys and Values of all results:")
51
- for i, result in enumerate(results):
52
- st.write(f"Keys and Values of results[{i}]:")
53
- for key, value in result.items():
54
- if key == 'label':
55
- label = value
56
- elif key == 'score':
57
- score = value
58
- st.write(f"{label}: {score}")
59
-
60
 
61
 
62
  #for i, result in enumerate(results):
@@ -90,15 +77,15 @@ if st.button("Predict Emotions") and uploaded_images:
90
  # st.write(f"{label}: {score}")
91
 
92
  # working, but double display
93
- #for i, result in enumerate(results):
94
- # st.write(f"Keys and Values of results[{i}]:")
95
- # for res in result:
96
- # for key, value in res.items():
97
- # if key == 'label':
98
- # label = value
99
- # elif key == 'score':
100
- # score = value
101
- # st.write(f"{label}: {score}")
102
 
103
 
104
 
 
43
  # for key, value in result.items():
44
  # st.write(f"Key: {key}, Value: {value}")
45
 
46
+
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
 
49
  #for i, result in enumerate(results):
 
77
  # st.write(f"{label}: {score}")
78
 
79
  # working, but double display
80
+ for i, result in enumerate(results):
81
+ st.write(f"Keys and Values of results[{i}]:")
82
+ for res in result:
83
+ for key, value in res.items():
84
+ if key == 'label':
85
+ label = value
86
+ elif key == 'score':
87
+ score = value
88
+ st.write(f"{label}: {score}")
89
 
90
 
91