Update 'face_recognition/app/app.py'
This commit is contained in:
parent
b06546cac6
commit
6a8e2f18a5
@ -19,6 +19,7 @@ def access_minio():
|
|||||||
|
|
||||||
@app.route('/new_user_id')
|
@app.route('/new_user_id')
|
||||||
def new_user_id():
|
def new_user_id():
|
||||||
|
#demo objekt speichern um id zu 'speichern'. Später mit if (type(object)==list oä überschreiben mit face_encoding.pkl
|
||||||
id = None
|
id = None
|
||||||
for limited_try in range(0,5):
|
for limited_try in range(0,5):
|
||||||
id = str(uuid.uuid4())
|
id = str(uuid.uuid4())
|
||||||
@ -28,7 +29,6 @@ def new_user_id():
|
|||||||
with open('/tmp/demo_object.pkl', 'wb') as f:
|
with open('/tmp/demo_object.pkl', 'wb') as f:
|
||||||
pickle.dump(demo_object, f)
|
pickle.dump(demo_object, f)
|
||||||
minioClient.fput_object('users', str(id), '/tmp/demo_object.pkl')
|
minioClient.fput_object('users', str(id), '/tmp/demo_object.pkl')
|
||||||
#funktionalität implementieres s3 Platzhalterdatei anlegen für user,
|
|
||||||
return(id)
|
return(id)
|
||||||
|
|
||||||
def check_id(id):
|
def check_id(id):
|
||||||
|
Loading…
Reference in New Issue
Block a user