Download app.py from huiiz/flaskapp: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/spaces/huiiz/flaskapp/resolve/main/app.py
- Command line
-
hf download hf://spaces/huiiz/flaskapp/app.py
-
curl -L -o app.py https://huggingface.co/spaces/huiiz/flaskapp/resolve/main/app.py
421 Bytes
| import time | |
| from flask import Flask, redirect, url_for | |
| app = Flask(__name__) | |
| updates = ["INIT"] | |
| def hello_world(): | |
| update_times = "\n".join([f"<li>{i}</li>" for i in updates]) | |
| return f"<p>Hello, World!</p><hr><h2>UPDATES</h2>{update_times}" | |
| def update(): | |
| current_time = time.ctime() | |
| updates.append(str(current_time)) | |
| return redirect(url_for('hello_world')) | |