@app.route('/add')
def add():
return render_template('add.html')
def gen(camera):
while True:
label, frame = camera.get_frame()
if label=="unknown":
print("Inside If condition")
with app.app_context():
add()
why can't we call the function in this way? Using add(), I want to redirect to some another template when an unknown face detected in the video streaming.