Update 'face_recognition/app/app.py'

This commit is contained in:
fabrice 2019-06-25 17:03:13 +00:00
parent 5645d64107
commit 96ddc93107

View File

@ -48,7 +48,7 @@ def new_face():
face_encoding_response = encode_face(temporary_img_path) face_encoding_response = encode_face(temporary_img_path)
if face_encoding_response['success']==True: if face_encoding_response['success']==True:
with open(temporary_pkl_path, 'wb') as file: with open(temporary_pkl_path, 'wb') as file:
pickle.dump(face_encoding, file) pickle.dump(face_encoding_response['encoding'], file)
minioClient.fput_object('users', str(id), temporary_pkl_path) minioClient.fput_object('users', str(id), temporary_pkl_path)
return jsonify({'success':face_encoding_response['success']}) return jsonify({'success':face_encoding_response['success']})