from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/api', methods=['POST'])
def predict():
pass
#Some statements to predict something
if __name__ == '__main__':
print("Hello World")
app.run(host='0.0.0.0', debug=True)
When I run as
gunicorn -b 0.0.0.0 app:app I do not see the print statement. However when I run as python app.py, the "Hello World" gets printed. The app runs but it does not execute the print statement. Any idea what causes the Gunicorn to ignore what is within main()?