[Use the same app.py content from before]