sarwansingh commited on
Commit
6d97ae5
·
verified ·
1 Parent(s): 2b7d38d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -38,7 +38,7 @@ if img_file_buffer is not None:
38
  imgS = cv2.cvtColor(imgS, cv2.COLOR_BGR2RGB)
39
  facesCurFrame = face_recognition.face_locations(imgS)
40
  encodesCurFrame = face_recognition.face_encodings(imgS, facesCurFrame)
41
-
42
  # run looop to find match in encodeListknown list
43
  for encodeFace, faceLoc in zip(encodesCurFrame, facesCurFrame):
44
  # Assuming that encodeListknown is defined and populated in your code
@@ -58,6 +58,8 @@ if img_file_buffer is not None:
58
 
59
  # display_image_with_overlay(image, name)
60
  st.image(image , use_column_width=True, output_format="PNG")
61
- else :
 
 
62
  st.warning("No faces detected in the image.")
63
 
 
38
  imgS = cv2.cvtColor(imgS, cv2.COLOR_BGR2RGB)
39
  facesCurFrame = face_recognition.face_locations(imgS)
40
  encodesCurFrame = face_recognition.face_encodings(imgS, facesCurFrame)
41
+ faceMatchedflag = 0
42
  # run looop to find match in encodeListknown list
43
  for encodeFace, faceLoc in zip(encodesCurFrame, facesCurFrame):
44
  # Assuming that encodeListknown is defined and populated in your code
 
58
 
59
  # display_image_with_overlay(image, name)
60
  st.image(image , use_column_width=True, output_format="PNG")
61
+ faceMatchedflag = 1
62
+
63
+ if(faceMatchedflag == 0) :
64
  st.warning("No faces detected in the image.")
65