xtlyxt commited on
Commit
f86d6c1
·
verified ·
1 Parent(s): 3981fbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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('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
 
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