Updated app.py and HTML template