mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
feature: port argument of api.py
This commit is contained in:
parent
efc8221d32
commit
f284ba8f15
12
api/api.py
12
api/api.py
@ -1,5 +1,6 @@
|
|||||||
from flask import Flask, jsonify, request, make_response
|
from flask import Flask, jsonify, request, make_response
|
||||||
|
|
||||||
|
import argparse
|
||||||
import uuid
|
import uuid
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
@ -206,6 +207,13 @@ def verify():
|
|||||||
|
|
||||||
return resp_obj, 200
|
return resp_obj, 200
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
|
|
||||||
app.run()
|
if __name__ == '__main__':
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
|
'-p', '--port',
|
||||||
|
type=int,
|
||||||
|
default=5000,
|
||||||
|
help='Port of serving api')
|
||||||
|
args = parser.parse_args()
|
||||||
|
app.run(host='0.0.0.0', port=args.port)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user