Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ def receive_image(image):
|
|
82 |
face_locations = []
|
83 |
face_encodings = []
|
84 |
face_names = []
|
85 |
-
|
86 |
# now = datetime.now()
|
87 |
# current_date = now.strftime("%Y-%m-%d")
|
88 |
# csv_file = open(f"{current_date}.csv", "a+", newline="")
|
@@ -91,6 +91,7 @@ def receive_image(image):
|
|
91 |
small_frame = cv2.resize(image, (0, 0), fx=0.25, fy=0.25)
|
92 |
rgb_small_frame = small_frame[:, :, ::-1]
|
93 |
emit("result",{"name":"level " +str(cnt),"score":str(len(face_encodings))})
|
|
|
94 |
face_locations = face_recognition.face_locations(rgb_small_frame)
|
95 |
face_encodings = face_recognition.face_encodings(small_frame, face_locations)
|
96 |
face_names = []
|
|
|
82 |
face_locations = []
|
83 |
face_encodings = []
|
84 |
face_names = []
|
85 |
+
|
86 |
# now = datetime.now()
|
87 |
# current_date = now.strftime("%Y-%m-%d")
|
88 |
# csv_file = open(f"{current_date}.csv", "a+", newline="")
|
|
|
91 |
small_frame = cv2.resize(image, (0, 0), fx=0.25, fy=0.25)
|
92 |
rgb_small_frame = small_frame[:, :, ::-1]
|
93 |
emit("result",{"name":"level " +str(cnt),"score":str(len(face_encodings))})
|
94 |
+
emit("result",{"name":"level1","score":"34"})
|
95 |
face_locations = face_recognition.face_locations(rgb_small_frame)
|
96 |
face_encodings = face_recognition.face_encodings(small_frame, face_locations)
|
97 |
face_names = []
|