mirror of
https://github.com/karl0ss/ai-frame-image-server.git
synced 2025-04-26 01:30:13 +01:00
sort gallery by new-old, move to -slim docker image
This commit is contained in:
parent
5ab4d76d4a
commit
42c8a2b988
@ -1,5 +1,5 @@
|
||||
# Use an official Python image as a base
|
||||
FROM python:3.11
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
@ -42,6 +42,7 @@ def gallery() -> str:
|
||||
str: The rendered HTML template.
|
||||
"""
|
||||
images = [f for f in os.listdir(image_folder) if f.lower().endswith(('png', 'jpg', 'jpeg', 'gif'))]
|
||||
images = sorted(images, reverse=True)
|
||||
return render_template("gallery.html", images=images)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user