Spaces:
Sleeping
Sleeping
seawolf2357
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,6 @@ menus = {
|
|
13 |
}
|
14 |
|
15 |
# ์ ํ๋ ๋ฉ๋ด ํญ๋ชฉ์ ์ ์ฅํ ๋ณ์
|
16 |
-
selected_menu = None
|
17 |
-
selected_sub_menu = None
|
18 |
-
|
19 |
-
# ๋ฉ๋ด ์์ฑ
|
20 |
selected_menu = st.sidebar.selectbox("Menu", list(menus.keys()))
|
21 |
selected_sub_menu = st.sidebar.selectbox("Sub Menu", menus[selected_menu])
|
22 |
|
@@ -24,12 +20,18 @@ selected_sub_menu = st.sidebar.selectbox("Sub Menu", menus[selected_menu])
|
|
24 |
if selected_menu == "Free Stock" and selected_sub_menu == "Template Video":
|
25 |
st.subheader("Template Videos")
|
26 |
|
27 |
-
# ๋น๋์ค
|
28 |
-
video_files = [
|
29 |
-
|
30 |
-
# ์ ํ๋ ๋น๋์ค๋ฅผ ์ ์ฅํ ๋ณ์
|
31 |
-
selected_video = st.radio("Select a video:", video_files)
|
32 |
|
33 |
-
#
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
# ์ ํ๋ ๋ฉ๋ด ํญ๋ชฉ์ ์ ์ฅํ ๋ณ์
|
|
|
|
|
|
|
|
|
16 |
selected_menu = st.sidebar.selectbox("Menu", list(menus.keys()))
|
17 |
selected_sub_menu = st.sidebar.selectbox("Sub Menu", menus[selected_menu])
|
18 |
|
|
|
20 |
if selected_menu == "Free Stock" and selected_sub_menu == "Template Video":
|
21 |
st.subheader("Template Videos")
|
22 |
|
23 |
+
# ๋น๋์ค ํ์ผ๊ณผ ์ธ๋ค์ผ ์ด๋ฏธ์ง ๊ฒฝ๋ก ์ค์
|
24 |
+
video_files = ["ex1.mp4", "ex2.mp4", "ex3.mp4", "ex4.mp4", "ex5.mp4", "ex6.mp4"]
|
25 |
+
thumbnails = ["thum1.jpg", "thum2.jpg", "thum3.jpg", "thum4.jpg", "thum5.jpg", "thum6.jpg"]
|
|
|
|
|
26 |
|
27 |
+
# ๊ฐค๋ฌ๋ฆฌ ํํ๋ก ์ธ๋ค์ผ ํ์
|
28 |
+
cols = st.columns(3)
|
29 |
+
for index in range(len(thumbnails)):
|
30 |
+
with cols[index % 3]:
|
31 |
+
st.image(thumbnails[index], width=100, caption=f"Video {index+1}")
|
32 |
+
if st.button(f"Play Video {index+1}", key=f"video{index+1}"):
|
33 |
+
# ์ ํ๋ ๋น๋์ค ์ฌ์
|
34 |
+
st.video(video_files[index])
|
35 |
+
|
36 |
+
# ์ฐธ๊ณ : Streamlit์ ํ์ฌ ์ด๋ฏธ์ง ํด๋ฆญ ์ด๋ฒคํธ๋ฅผ ์ง์ ์ฒ๋ฆฌํ ์ ์์ผ๋ฏ๋ก,
|
37 |
+
# ๋น๋์ค ์ฌ์์ ์ํ ๋ฒํผ์ ์ ๊ณตํฉ๋๋ค.
|