diff --git a/ai_frame_image_server.py b/ai_frame_image_server.py index 6777f24..dba86ce 100644 --- a/ai_frame_image_server.py +++ b/ai_frame_image_server.py @@ -19,18 +19,21 @@ image_folder = "./output" @app.route("/", methods=["GET"]) def index() -> str: """ - Renders the main HTML template. - Args: - None - Returns: - str: The rendered HTML template. + Renders the main HTML template with image and prompt. """ + image_filename = "./image.png" + image_path = os.path.join(image_folder, image_filename) + + prompt = get_prompt_from_png(image_path) + return render_template( "index.html", - image="./image.png", + image=image_filename, + prompt=prompt, reload_interval=user_config["frame"]["reload_interval"], ) + @app.route("/images", methods=["GET"]) def gallery() -> str: """ diff --git a/templates/gallery.html b/templates/gallery.html index cc65b42..3b53616 100644 --- a/templates/gallery.html +++ b/templates/gallery.html @@ -5,17 +5,37 @@
No images found
+No images found
{% endif %}