From d067ba3ac8d11a42141d58af9afaed69351b3c28 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 23 Sep 2023 02:08:10 +0700 Subject: [PATCH] Update app.py --- access_control_python_server/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/access_control_python_server/app.py b/access_control_python_server/app.py index 2e057c8..f81a61e 100644 --- a/access_control_python_server/app.py +++ b/access_control_python_server/app.py @@ -3,6 +3,7 @@ import json import cv2 import base64 import numpy as np +from deepface import DeepFace app = Flask(__name__) @@ -18,9 +19,8 @@ def process_image(): request_data = json.loads(request.data.decode("utf-8")) img_nparr = np.frombuffer(base64.b64decode(request_data['image']), np.uint8) img = cv2.imdecode(img_nparr,cv2.IMREAD_COLOR) - cv2.imwrite("retrieved_img.jpg",img) - print(request_data) - return "Bing Bong!" + racist_detector = DeepFace.analyze(img) + return racist_detector if __name__ == '__main__':