Spaces:
Running
Running
Upload webapp.py
Browse files
webapp.py
CHANGED
@@ -133,7 +133,8 @@ def main():
|
|
133 |
frame_buffer = st.camera_input("Take a picture")
|
134 |
|
135 |
if frame_buffer is not None:
|
136 |
-
|
|
|
137 |
result, process_this_frame, face_locations, faces, face_names, score = demo.process_frame(frame, process_this_frame, face_locations, faces, face_names, score)
|
138 |
# Display the resulting image
|
139 |
FRAME_WINDOW.image(result)
|
|
|
133 |
frame_buffer = st.camera_input("Take a picture")
|
134 |
|
135 |
if frame_buffer is not None:
|
136 |
+
bytes_data = frame_buffer.getvalue()
|
137 |
+
frame = cv2.imdecode(np.frombuffer(bytes_data, np.uint8), cv2.IMREAD_COLOR)
|
138 |
result, process_this_frame, face_locations, faces, face_names, score = demo.process_frame(frame, process_this_frame, face_locations, faces, face_names, score)
|
139 |
# Display the resulting image
|
140 |
FRAME_WINDOW.image(result)
|