seawolf2357 commited on
Commit
e105dd1
ยท
verified ยท
1 Parent(s): f47671d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -24,10 +24,9 @@ for menu, sub_menus in menus.items():
24
  # ์„ ํƒ๋œ ๋ฉ”๋‰ด์™€ ์„œ๋ธŒ ๋ฉ”๋‰ด์— ๋Œ€ํ•œ ์ฒ˜๋ฆฌ ๋กœ์ง์„ ์—ฌ๊ธฐ์— ์ถ”๊ฐ€
25
 
26
 
27
- # 'Template Video'๊ฐ€ ์„ ํƒ๋˜์—ˆ์„ ๋•Œ ๋น„๋””์˜ค ๊ฐค๋Ÿฌ๋ฆฌ๋ฅผ ํ‘œ์‹œ
28
  if selected_menu == "Free Stock" and selected_sub_menu == "Template Video":
29
  st.subheader("Template Videos")
30
-
31
  # ๋น„๋””์˜ค ํŒŒ์ผ๊ณผ ์ธ๋„ค์ผ ์ด๋ฏธ์ง€ ๊ฒฝ๋กœ ์„ค์ •
32
  video_files = ["ex1.mp4", "ex2.mp4", "ex3.mp4", "ex4.mp4", "ex5.mp4", "ex6.mp4"]
33
  thumbnails = ["thum1.png", "thum2.png", "thum3.png", "thum4.png", "thum5.png", "thum6.png"]
@@ -36,9 +35,9 @@ if selected_menu == "Free Stock" and selected_sub_menu == "Template Video":
36
  cols = st.columns(3)
37
  for index, thumbnail in enumerate(thumbnails):
38
  with cols[index % 3]:
39
- if st.image(thumbnail, width=200, caption=f"Video {index+1}", use_column_width=True):
40
- selected_video = video_files[index]
 
 
 
41
 
42
- # ์„ ํƒ๋œ ๋น„๋””์˜ค๊ฐ€ ์žˆ๋‹ค๋ฉด ํ•˜๋‹จ์— ๋น„๋””์˜ค ์žฌ์ƒ
43
- if selected_video:
44
- st.video(selected_video)
 
24
  # ์„ ํƒ๋œ ๋ฉ”๋‰ด์™€ ์„œ๋ธŒ ๋ฉ”๋‰ด์— ๋Œ€ํ•œ ์ฒ˜๋ฆฌ ๋กœ์ง์„ ์—ฌ๊ธฐ์— ์ถ”๊ฐ€
25
 
26
 
27
+ # ์„ ํƒ๋œ ๋ฉ”๋‰ด ๋ฐ ์„œ๋ธŒ๋ฉ”๋‰ด์— ๋”ฐ๋ผ ๋‚ด์šฉ ํ‘œ์‹œ
28
  if selected_menu == "Free Stock" and selected_sub_menu == "Template Video":
29
  st.subheader("Template Videos")
 
30
  # ๋น„๋””์˜ค ํŒŒ์ผ๊ณผ ์ธ๋„ค์ผ ์ด๋ฏธ์ง€ ๊ฒฝ๋กœ ์„ค์ •
31
  video_files = ["ex1.mp4", "ex2.mp4", "ex3.mp4", "ex4.mp4", "ex5.mp4", "ex6.mp4"]
32
  thumbnails = ["thum1.png", "thum2.png", "thum3.png", "thum4.png", "thum5.png", "thum6.png"]
 
35
  cols = st.columns(3)
36
  for index, thumbnail in enumerate(thumbnails):
37
  with cols[index % 3]:
38
+ st.image(thumbnail, width=200, caption=f"Video {index+1}")
39
+ # 'Play Video' ๋ฒ„ํŠผ ์ถ”๊ฐ€
40
+ if st.button(f"Play Video {index+1}", key=f"play_{index}"):
41
+ # ์„ ํƒ๋œ ๋น„๋””์˜ค ์žฌ์ƒ
42
+ st.video(video_files[index])
43