Generated image formate into 2 columns
Browse files
Experiments/Baseline/GUI.py
CHANGED
@@ -56,6 +56,10 @@ if uploaded_diary and uploaded_writer_image:
|
|
56 |
# Assuming generated images are saved as 'comic_book/page_1.png', 'comic_book/page_2.png', etc.
|
57 |
image_files = sorted(glob.glob("comic_book/page_*.png")) # Find all the generated comic book pages
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
56 |
# Assuming generated images are saved as 'comic_book/page_1.png', 'comic_book/page_2.png', etc.
|
57 |
image_files = sorted(glob.glob("comic_book/page_*.png")) # Find all the generated comic book pages
|
58 |
|
59 |
+
# Display images in 2 columns
|
60 |
+
cols = st.columns(2) # Create two columns for the images
|
61 |
+
|
62 |
+
for i, image_file in enumerate(image_files):
|
63 |
+
with cols[i % 2]: # Alternate between the two columns
|
64 |
+
# Display each comic book page in the respective column
|
65 |
+
st.image(image_file, caption=image_file.split('/')[-1], use_column_width=True)
|