Update 'face_recognition/app/app.py'

This commit is contained in:
fabrice 2019-06-23 16:54:49 +00:00
parent e240ae0f58
commit 1c2138b632

View File

@ -37,8 +37,7 @@ def new_user_id():
#call like https://face.sguba.de/init_face?id=123&encoded_string=abc
def new_face():
id = request.args.get('id', None)
data = dict(request.form)
img=data['content']
img = request.args.get('encoded_string', None)
imgdata = base64.b64decode(img)
with open('/tmp/'+str(id), 'wb') as file:
file.write(imgdata)
@ -53,8 +52,7 @@ def new_face():
#call like https://face.sguba.de/check_face?id=123&encoded_string=abc
def check_face():
id = request.args.get('id', None)
data = dict(request.form)
img=data['content']
img = request.args.get('encoded_string', None)
imgdata = base64.b64decode(img)
with open('/tmp/'+str(id), 'wb') as file:
file.write(imgdata)