echung682 commited on
Commit
1bdf26c
·
verified ·
1 Parent(s): 06fbfcf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -61,6 +61,7 @@ def emotionAnalysis(message, face):
61
  try:
62
  img_rgb = cv2.cvtColor(face, cv2.COLOR_BGR2RGB)
63
  result = face_emotion_detector.top_emotion(img_rgb)
 
64
  if result is not None: # Only update if we got a valid result
65
  face_emotion, face_score = result
66
  else:
@@ -70,6 +71,7 @@ def emotionAnalysis(message, face):
70
  face_emotion = f"Error processing image: {str(e)}"
71
  face_score = 0.0
72
 
 
73
  # Store facial emotion data for plotting
74
  face_dataDict["Time"].append(face_timestamp)
75
  face_dataDict["Emotion"].append(face_emotion) # Now face_emotion will always be a string
 
61
  try:
62
  img_rgb = cv2.cvtColor(face, cv2.COLOR_BGR2RGB)
63
  result = face_emotion_detector.top_emotion(img_rgb)
64
+ print(result)
65
  if result is not None: # Only update if we got a valid result
66
  face_emotion, face_score = result
67
  else:
 
71
  face_emotion = f"Error processing image: {str(e)}"
72
  face_score = 0.0
73
 
74
+ print(face_emotion)
75
  # Store facial emotion data for plotting
76
  face_dataDict["Time"].append(face_timestamp)
77
  face_dataDict["Emotion"].append(face_emotion) # Now face_emotion will always be a string