mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 19:45:21 +00:00
bug for analyze in api
This commit is contained in:
parent
352da73830
commit
ba3db18671
14
api/api.py
14
api/api.py
@ -66,10 +66,18 @@ def analyze():
|
|||||||
|
|
||||||
toc = time.time()
|
toc = time.time()
|
||||||
|
|
||||||
resp_obj["trx_id"] = trx_id
|
resp = {}
|
||||||
resp_obj["seconds"] = toc-tic
|
|
||||||
|
|
||||||
return resp_obj, 200
|
resp["trx_id"] = trx_id
|
||||||
|
resp["seconds"] = toc-tic
|
||||||
|
|
||||||
|
if isinstance(resp_obj, list):
|
||||||
|
for idx, instance in enumerate(resp_obj):
|
||||||
|
resp[f"instance_{idx+1}"] = instance
|
||||||
|
elif isinstance(resp_obj, dict):
|
||||||
|
resp["instance_1"] = resp_obj
|
||||||
|
|
||||||
|
return resp, 200
|
||||||
|
|
||||||
def analyzeWrapper(req, trx_id = 0):
|
def analyzeWrapper(req, trx_id = 0):
|
||||||
resp_obj = jsonify({'success': False})
|
resp_obj = jsonify({'success': False})
|
||||||
|
@ -10,11 +10,14 @@
|
|||||||
# build deepface image
|
# build deepface image
|
||||||
docker build -t deepface_image .
|
docker build -t deepface_image .
|
||||||
|
|
||||||
|
# copy weights from your local
|
||||||
|
# docker cp ~/.deepface/weights/. <CONTAINER_ID>:/root/.deepface/weights/
|
||||||
|
|
||||||
# run image
|
# run image
|
||||||
docker run --net="host" deepface
|
docker run --net="host" deepface
|
||||||
|
|
||||||
# to access the inside of docker image when it is in running status
|
# to access the inside of docker image when it is in running status
|
||||||
# docker run -it --net="host" deepface /bin/sh
|
# docker exec -it <CONTAINER_ID> /bin/sh
|
||||||
|
|
||||||
# healthcheck
|
# healthcheck
|
||||||
# sleep 3s
|
# sleep 3s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user