seawolf2357 commited on
Commit
5eebf86
โ€ข
1 Parent(s): eccd417

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -157,6 +157,7 @@ if selected_menu == "Home":
157
  "ViDraft-TTS.png",
158
  "ViDraft-image-remove background.png"
159
  ]
 
160
  image_texts = [
161
  "Video Template",
162
  "Video Search",
@@ -164,11 +165,15 @@ if selected_menu == "Home":
164
  "TTS (Voice)",
165
  "ViDraft-image-remove background"
166
  ]
167
- for col, img_file, img_text in zip(cols, image_files, image_texts):
168
- with col:
169
- st.image(img_file, use_column_width=True)
170
- st.caption(img_text) # ํŒŒ์ผ๋ช…์„ ํ†ตํ•ด ์ด๋ฏธ์ง€ ์•„๋ž˜ ํ…์ŠคํŠธ ๋ฐ˜์˜
171
-
 
 
 
 
172
 
173
  elif selected_menu == "Free Stock":
174
  # 'Free Stock' ๋ฉ”๋‰ด ์„ ํƒ ์‹œ ์ฒ˜๋ฆฌ ๋กœ์ง
 
157
  "ViDraft-TTS.png",
158
  "ViDraft-image-remove background.png"
159
  ]
160
+
161
  image_texts = [
162
  "Video Template",
163
  "Video Search",
 
165
  "TTS (Voice)",
166
  "ViDraft-image-remove background"
167
  ]
168
+
169
+ # ์ด๋ฏธ์ง€๋“ค์„ ํ•œ ์ค„์— 4์žฅ์”ฉ ๋ฐฐ์น˜
170
+ for i in range(0, len(image_files), 4):
171
+ cols = st.columns(4) # 4๊ฐœ์˜ ์—ด ์ƒ์„ฑ
172
+ for col, img_file, img_text in zip(cols, image_files[i:i+4], image_texts[i:i+4]):
173
+ with col:
174
+ st.image(img_file, use_column_width=True)
175
+ st.caption(img_text)
176
+
177
 
178
  elif selected_menu == "Free Stock":
179
  # 'Free Stock' ๋ฉ”๋‰ด ์„ ํƒ ์‹œ ์ฒ˜๋ฆฌ ๋กœ์ง