jjz5463 commited on
Commit
fd2fa1f
·
1 Parent(s): 49671af

Generated image formate into 2 columns

Browse files
Files changed (1) hide show
  1. Experiments/Baseline/GUI.py +7 -3
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
- for image_file in image_files:
60
- # Display each comic book page
61
- st.image(image_file, caption=image_file.split('/')[-1], use_column_width=True)
 
 
 
 
 
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)