I am trying to create a face recognition API where
I have a function face_rec(image)
given an image file will return the names of people in the image as string.
Now I want my flask API so that I can call
0.0.0.0:5000/face_rec?file=https://www.rd.com/wp-content/uploads/2018/03/rdj.jpg
and it will return the name (in this case Robert Downey JR)
which I have no problem with face_rec but I cannot get the file input as a URL argument to work
@app.route('/face_rec', methods=['POST', 'GET'])
def face_recognition():
file = request.args.get('file')
print(file)
name = face_rec(file)
resp_data = {'name': name}
return json.dumps(resp_data)