Spaces:
Sleeping
Sleeping
Update
Browse files
app.py
CHANGED
@@ -18,9 +18,9 @@ def compare_face(frame1, frame2):
|
|
18 |
|
19 |
face1 = None
|
20 |
face2 = None
|
21 |
-
|
22 |
-
if
|
23 |
-
face =
|
24 |
print("--------------", face)
|
25 |
x1 = face.get('x')
|
26 |
y1 = face.get('y')
|
@@ -42,9 +42,9 @@ def compare_face(frame1, frame2):
|
|
42 |
|
43 |
face1 = face1.resize((int(resized_w), int(resized_h)))
|
44 |
|
45 |
-
|
46 |
-
if
|
47 |
-
face =
|
48 |
print("++++++++++--------------", face)
|
49 |
x1 = face.get('x')
|
50 |
y1 = face.get('y')
|
@@ -88,7 +88,7 @@ def compare_face(frame1, frame2):
|
|
88 |
pass
|
89 |
|
90 |
print(face1, face2)
|
91 |
-
return [r.json(), []]
|
92 |
|
93 |
with gr.Blocks() as demo:
|
94 |
gr.Markdown(
|
|
|
18 |
|
19 |
face1 = None
|
20 |
face2 = None
|
21 |
+
res1 = r.json().get('image1')
|
22 |
+
if res1 is not None:
|
23 |
+
face = res1.get('detection')
|
24 |
print("--------------", face)
|
25 |
x1 = face.get('x')
|
26 |
y1 = face.get('y')
|
|
|
42 |
|
43 |
face1 = face1.resize((int(resized_w), int(resized_h)))
|
44 |
|
45 |
+
res2 = r.json().get('image2')
|
46 |
+
if res2 is not None:
|
47 |
+
face = res2.get('detection')
|
48 |
print("++++++++++--------------", face)
|
49 |
x1 = face.get('x')
|
50 |
y1 = face.get('y')
|
|
|
88 |
pass
|
89 |
|
90 |
print(face1, face2)
|
91 |
+
return [r.json(), [face1, face2]]
|
92 |
|
93 |
with gr.Blocks() as demo:
|
94 |
gr.Markdown(
|