Update 'face_recognition/app/app.py'
This commit is contained in:
parent
e240ae0f58
commit
1c2138b632
@ -37,8 +37,7 @@ def new_user_id():
|
|||||||
#call like https://face.sguba.de/init_face?id=123&encoded_string=abc
|
#call like https://face.sguba.de/init_face?id=123&encoded_string=abc
|
||||||
def new_face():
|
def new_face():
|
||||||
id = request.args.get('id', None)
|
id = request.args.get('id', None)
|
||||||
data = dict(request.form)
|
img = request.args.get('encoded_string', None)
|
||||||
img=data['content']
|
|
||||||
imgdata = base64.b64decode(img)
|
imgdata = base64.b64decode(img)
|
||||||
with open('/tmp/'+str(id), 'wb') as file:
|
with open('/tmp/'+str(id), 'wb') as file:
|
||||||
file.write(imgdata)
|
file.write(imgdata)
|
||||||
@ -53,8 +52,7 @@ def new_face():
|
|||||||
#call like https://face.sguba.de/check_face?id=123&encoded_string=abc
|
#call like https://face.sguba.de/check_face?id=123&encoded_string=abc
|
||||||
def check_face():
|
def check_face():
|
||||||
id = request.args.get('id', None)
|
id = request.args.get('id', None)
|
||||||
data = dict(request.form)
|
img = request.args.get('encoded_string', None)
|
||||||
img=data['content']
|
|
||||||
imgdata = base64.b64decode(img)
|
imgdata = base64.b64decode(img)
|
||||||
with open('/tmp/'+str(id), 'wb') as file:
|
with open('/tmp/'+str(id), 'wb') as file:
|
||||||
file.write(imgdata)
|
file.write(imgdata)
|
||||||
|
Loading…
Reference in New Issue
Block a user