Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -166,13 +166,13 @@ if st.button("Generate DataFrame") and selected_images:
|
|
166 |
|
167 |
# Append image metadata and emotion scores to the list
|
168 |
df_data.append({
|
169 |
-
"Neutral": f"{emotion_scores.get('
|
170 |
-
"Happy": f"{emotion_scores.get('
|
171 |
-
"Sad": f"{emotion_scores.get('
|
172 |
-
"Angry": f"{emotion_scores.get('
|
173 |
-
"Disgust": f"{emotion_scores.get('
|
174 |
-
"Surprise": f"{emotion_scores.get('
|
175 |
-
"Fear": f"{emotion_scores.get('
|
176 |
"File Name": file_name,
|
177 |
"Size (KB)": size_kb,
|
178 |
"Timestamp": timestamp.strftime('%Y-%m-%d %H:%M:%S'), # Format timestamp
|
|
|
166 |
|
167 |
# Append image metadata and emotion scores to the list
|
168 |
df_data.append({
|
169 |
+
"Neutral": f"{emotion_scores.get('neutral', 0.0):.4f}",
|
170 |
+
"Happy": f"{emotion_scores.get('happy', 0.0):.4f}",
|
171 |
+
"Sad": f"{emotion_scores.get('sad', 0.0):.4f}",
|
172 |
+
"Angry": f"{emotion_scores.get('angry', 0.0):.4f}",
|
173 |
+
"Disgust": f"{emotion_scores.get('disgust', 0.0):.4f}",
|
174 |
+
"Surprise": f"{emotion_scores.get('surprise', 0.0):.4f}",
|
175 |
+
"Fear": f"{emotion_scores.get('fear', 0.0):.4f}", # Add this line if 'Fear' is a possible label
|
176 |
"File Name": file_name,
|
177 |
"Size (KB)": size_kb,
|
178 |
"Timestamp": timestamp.strftime('%Y-%m-%d %H:%M:%S'), # Format timestamp
|