From ec57cf5d575eb8d848573765212c1e605e1b1aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Fri, 28 Aug 2026 09:32:22 +0300 Subject: [PATCH] Align Flask app with Nubes template --- requirements.txt | 3 ++- site/app.py | 18 +++--------------- site/templates/index.html | 6 ------ 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/requirements.txt b/requirements.txt index 33dd199..0a5d8dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ Flask>=3.0 -gunicorn>=21.2 \ No newline at end of file +gunicorn>=21.2 +requests>=2.31 \ No newline at end of file diff --git a/site/app.py b/site/app.py index bba5bd3..4ed0a4d 100644 --- a/site/app.py +++ b/site/app.py @@ -1,29 +1,17 @@ -import platform -from datetime import datetime, timezone - from flask import Flask, jsonify, render_template -import flask - -VERSION = "0.0.1" app = Flask(__name__, template_folder="templates", static_folder="static") @app.route("/") def index(): - return render_template( - "index.html", - version=VERSION, - current_time=datetime.now(timezone.utc).isoformat(), - python_version=platform.python_version(), - flask_version=flask.__version__, - ) + return render_template("index.html") @app.route("/health") def health(): - return jsonify(status="ok", version=VERSION) + return jsonify(status="ok") if __name__ == "__main__": - app.run(debug=True, host="0.0.0.0", port=5000) \ No newline at end of file + app.run(host="0.0.0.0", port=5000) \ No newline at end of file diff --git a/site/templates/index.html b/site/templates/index.html index 0691c8a..caeb24b 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -10,12 +10,6 @@

Recipe handwriting recognition

Managed Flask server is running.

-
-
Version
{{ version }}
-
UTC time
{{ current_time }}
-
Python
{{ python_version }}
-
Flask
{{ flask_version }}
-
\ No newline at end of file