add flask as a dependency
Re-arrange imports, use flask's app.route(methods=['POST']) to ensure data was posted.