Spaces:
Running
Running
seawolf2357
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,15 @@ st.set_page_config(layout="wide")
|
|
6 |
# μ¬μ΄λλ° νμ΄ν μ€μ
|
7 |
st.sidebar.title("ViDraft")
|
8 |
|
9 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
menus = {
|
11 |
"Free Stock": ["Template Video", "Template Image", "Search Video", "Search Image"],
|
12 |
"Image": ["Generation", "Face ID", "Inpainting", "Remove Background", "Studio"],
|
@@ -15,10 +23,6 @@ menus = {
|
|
15 |
"Scripts": ["Script"]
|
16 |
}
|
17 |
|
18 |
-
# μ νλ λ©λ΄ λ° νλΆ λ©λ΄ μ΄κΈ°ν
|
19 |
-
selected_menu = None
|
20 |
-
selected_sub_menu = None
|
21 |
-
|
22 |
# κ° λ©λ΄λ³ νλΆ λ©λ΄λ₯Ό νΌμΉ¨
|
23 |
for menu_name, sub_menus in menus.items():
|
24 |
with st.sidebar.expander(menu_name):
|
@@ -33,19 +37,20 @@ if selected_menu and selected_sub_menu:
|
|
33 |
st.subheader(f"{selected_menu} > {selected_sub_menu}")
|
34 |
# μ¬κΈ°μ μ νλ λ©λ΄μ λ°λ₯Έ μ½ν
μΈ νμ λ‘μ§ μΆκ°
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
st.subheader("Template Videos")
|
39 |
-
|
40 |
-
# λΉλμ€ νμΌ κ²½λ‘ μ€μ
|
41 |
-
video_files = ["ex1.mp4", "ex2.mp4", "ex3.mp4", "ex4.mp4", "ex5.mp4", "ex6.mp4", "ex7.mp4","ex8.mp4", "ex9.mp4", "ex10.mp4", "ex11.mp4", "ex12.mp4", "ex13.mp4", "ex14.mp4","ex15.mp4", "ex16.mp4", "ex17.mp4", "ex18.mp4"]
|
42 |
-
|
43 |
-
# κ°€λ¬λ¦¬ ννλ‘ λΉλμ€ νμ
|
44 |
-
cols = st.columns(2) # 2κ°μ μ΄λ‘ λκ² λ°°μΉ
|
45 |
-
for index, video_file in enumerate(video_files):
|
46 |
-
with cols[index % 2]:
|
47 |
-
st.video(video_file)
|
48 |
-
else:
|
49 |
-
# μ무κ²λ μ νλμ§ μμμ λ κΈ°λ³Έ νλ©΄μ "ViDraft" μΆλ ₯
|
50 |
st.title("ViDraft")
|
51 |
-
st.write("Welcome to ViDraft!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
# μ¬μ΄λλ° νμ΄ν μ€μ
|
7 |
st.sidebar.title("ViDraft")
|
8 |
|
9 |
+
# 'Home' λ²νΌμ μ¬μ΄λλ°μ μΆκ°
|
10 |
+
if st.sidebar.button('Home'):
|
11 |
+
selected_menu = 'Home'
|
12 |
+
selected_sub_menu = None
|
13 |
+
else:
|
14 |
+
selected_menu = None
|
15 |
+
selected_sub_menu = None
|
16 |
+
|
17 |
+
# λ©λ΄ νλͺ©κ³Ό νμ νλͺ© μ μ, 'Home' λ©λ΄λ λ²νΌμΌλ‘ μ²λ¦¬λλ―λ‘ μ¬κΈ°μλ ν¬ν¨μν€μ§ μμ
|
18 |
menus = {
|
19 |
"Free Stock": ["Template Video", "Template Image", "Search Video", "Search Image"],
|
20 |
"Image": ["Generation", "Face ID", "Inpainting", "Remove Background", "Studio"],
|
|
|
23 |
"Scripts": ["Script"]
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
# κ° λ©λ΄λ³ νλΆ λ©λ΄λ₯Ό νΌμΉ¨
|
27 |
for menu_name, sub_menus in menus.items():
|
28 |
with st.sidebar.expander(menu_name):
|
|
|
37 |
st.subheader(f"{selected_menu} > {selected_sub_menu}")
|
38 |
# μ¬κΈ°μ μ νλ λ©λ΄μ λ°λ₯Έ μ½ν
μΈ νμ λ‘μ§ μΆκ°
|
39 |
|
40 |
+
# 'Home' λ©λ΄κ° μ νλμμ λ λλ μ±μ΄ μ΄κΈ° μνμΌ λ νλ©΄μ "ViDraft" μΆλ ₯
|
41 |
+
if selected_menu == 'Home' or (selected_menu is None and selected_sub_menu is None):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
st.title("ViDraft")
|
43 |
+
st.write("Welcome to ViDraft! Your ultimate platform for video editing, image processing, and sound engineering.")
|
44 |
+
|
45 |
+
# 'Template Video'κ° μ νλμμ λ λΉλμ€ κ°€λ¬λ¦¬λ₯Ό νμ
|
46 |
+
if selected_menu == "Free Stock" and selected_sub_menu == "Template Video":
|
47 |
+
st.subheader("Template Videos")
|
48 |
+
|
49 |
+
# λΉλμ€ νμΌ κ²½λ‘ μ€μ
|
50 |
+
video_files = ["ex1.mp4", "ex2.mp4", "ex3.mp4", "ex4.mp4", "ex5.mp4", "ex6.mp4", "ex7.mp4","ex8.mp4", "ex9.mp4", "ex10.mp4", "ex11.mp4", "ex12.mp4", "ex13.mp4", "ex14.mp4","ex15.mp4", "ex16.mp4", "ex17.mp4", "ex18.mp4"]
|
51 |
+
|
52 |
+
# κ°€λ¬λ¦¬ ννλ‘ λΉλμ€ νμ
|
53 |
+
cols = st.columns(2) # 2κ°μ μ΄λ‘ λκ² λ°°μΉ
|
54 |
+
for index, video_file in enumerate(video_files):
|
55 |
+
with cols[index % 2]:
|
56 |
+
st.video(video_file)
|