flask app: update progress bar while function runs,app.run()