echung682 commited on
Commit
0ee729f
·
verified ·
1 Parent(s): 1bdf26c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -62,7 +62,7 @@ def emotionAnalysis(message, face):
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:
68
  face_emotion = "No face detected"
 
62
  img_rgb = cv2.cvtColor(face, cv2.COLOR_BGR2RGB)
63
  result = face_emotion_detector.top_emotion(img_rgb)
64
  print(result)
65
+ if result[0] is not None: # Only update if we got a valid result
66
  face_emotion, face_score = result
67
  else:
68
  face_emotion = "No face detected"