face_detection: retrieve only number of uploaded faces
diff --git a/apps/face_detection/main.py b/apps/face_detection/main.py
index 1d92491..82bae42 100644
--- a/apps/face_detection/main.py
+++ b/apps/face_detection/main.py
@@ -26,14 +26,14 @@
def upload_face_segments(gql_endpoint, id, faces):
segments = [format_img_segment(id, f) for f in faces]
- data = {"query": "mutation {{ addImageSegment(input: [{segments}]) {{ imageSegment {{ id }} }} }}".format(
+ data = {"query": "mutation {{ addImageSegment(input: [{segments}]) {{ numUids }} }}".format(
segments=", ".join(segments))}
# encoded_data = urllib.parse.urlencode(data).encode('UTF-8')
req = urllib.request.Request(gql_endpoint, method="POST")
req.add_header('Content-Type', 'application/json')
resp = urllib.request.urlopen(req, json.dumps(data).encode('UTF-8'))
print(resp.read())
-
+
def main():
method = "haar"