Update 'face_recognition/app/app.py'

This commit is contained in:
fabrice 2019-06-25 17:18:45 +00:00
parent 16e8558d8b
commit 09a24ce442

View File

@ -66,6 +66,8 @@ def check_face():
with open(temporary_pkl_path, 'rb') as file: with open(temporary_pkl_path, 'rb') as file:
face_encoding = pickle.load(file) face_encoding = pickle.load(file)
face_encoding_response['result'] = str(face_recognition.compare_faces([face_encoding], face_encoding_response['encoding'])[0]) face_encoding_response['result'] = str(face_recognition.compare_faces([face_encoding], face_encoding_response['encoding'])[0])
else:
face_encoding_response['result'] = str(False)
return jsonify({'result':face_encoding_response['result'],'success':face_encoding_response['success']}) return jsonify({'result':face_encoding_response['result'],'success':face_encoding_response['success']})