First I created __init__.py
__init__.py
from flask import Flask app = Flask(__name__)
Then in a separate file, in the same directory,
Just rename your file to app.py and it will works.