Update app.py
This commit is contained in:
parent
c2bca54fca
commit
d067ba3ac8
|
@ -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__':
|
||||
|
|
Loading…
Reference in New Issue