Error while Creating a new Docker Image, the app.py file content mismatch comparing the demo video and the app.py file in the github

I am trying to practice the Creating a new Docker Image.
Found that the app.py file in github is bit different to the one showed in the demo, which has Database connections. So I have created similar app.py with database connections, but got an error.
Can I find a full app.py file with database connections, I may be missing something else.

Lol, it only allows me to add only one picture…!!!

try this link git clone https://github.com/mmumshad/example-voting-app.git
cd example-voting-app/
then build your images

Hey, i tried to take app.py file and to write cat > /opt/app.py .
and then FLASK_APP=app.py flask run --host=0.0.0.0. but is the same