File size: 5,633 Bytes
cead143
79d2b6a
970d605
d92242c
cf6dcc7
d80d56f
d92242c
d80d56f
 
 
 
d92242c
 
 
d80d56f
 
d92242c
 
150cfea
 
 
 
 
edfc9c4
150cfea
 
 
edfc9c4
150cfea
 
 
 
 
 
970d605
edfc9c4
c187d44
edfc9c4
 
 
d80d56f
edfc9c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80d56f
edfc9c4
d80d56f
 
 
edfc9c4
d80d56f
edfc9c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80d56f
edfc9c4
 
 
 
 
 
 
 
 
 
 
 
 
 
d80d56f
edfc9c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80d56f
edfc9c4
 
150cfea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import streamlit as st

# νŽ˜μ΄μ§€ μ„€μ •
st.set_page_config(page_title="ViDraft", layout="wide")

# μ‚¬μ΄λ“œλ°” 타이틀 μ„€μ •
st.sidebar.title("ViDraft")

# 메뉴 및 ν•˜μœ„ 메뉴 μ •μ˜
menus = {
    "Home": [],
    "Free Stock": ["Template Video", "Template Image", "Search Video", "Search Image"],
    "Image": ["Generation", "Face ID", "Inpainting", "Remove Background", "Studio"],
    "Video": ["Generation", "Talking Face", "Remove Background", "Studio"],
    "Sound": ["Video SFX", "Video Music", "TTS(Voice)", "Image SFX", "Image Music"],
    "Scripts": []
}

# μ„Έμ…˜ μƒνƒœ μ΄ˆκΈ°ν™”
if 'current_menu' not in st.session_state:
    st.session_state['current_menu'] = 'Home'
if 'current_sub_menu' not in st.session_state:
    st.session_state['current_sub_menu'] = ''

# 메인 메뉴 선택
selected_menu = st.sidebar.selectbox("Menu", list(menus.keys()))
st.session_state['current_menu'] = selected_menu

# ν•˜μœ„ 메뉴 선택 (ν•΄λ‹Ήλ˜λŠ” 경우)
if selected_menu in menus:
    selected_sub_menu = st.sidebar.selectbox("Sub Menu", [""] + menus[selected_menu])
    st.session_state['current_sub_menu'] = selected_sub_menu
else:
    st.session_state['current_sub_menu'] = ''

# 'Home' νŽ˜μ΄μ§€ ν‘œμ‹œ
if selected_menu == "Home":
    st.header("Welcome to ViDraft")
    st.write("Choose an option from the sidebar to get started.")
elif selected_menu == "Free Stock":
    # 'Free Stock' 메뉴 선택 μ‹œ 처리 둜직
    if st.session_state['current_sub_menu'] == "Template Video":
        st.header("Template Videos")
        st.write("Explore a variety of video templates.")
        # λΉ„λ””μ˜€ 파일 경둜 μ„€μ • 및 λΉ„λ””μ˜€ ν‘œμ‹œ 둜직
        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"]
        # 가러리 ν˜•νƒœλ‘œ λΉ„λ””μ˜€ ν‘œμ‹œ
        cols = st.columns(2)  # 2개의 μ—΄λ‘œ λ„“κ²Œ 배치
        for index, video_file in enumerate(video_files):
            with cols[index % 2]:
                st.video(video_file)
    elif st.session_state['current_sub_menu'] == "Template Image":
        st.header("Template Images")
        st.write("Find the perfect image template for your project.")
    elif st.session_state['current_sub_menu'] == "Search Video":
        st.header("Search Videos")
        st.write("Search through our extensive video library to find exactly what you need.")
    elif st.session_state['current_sub_menu'] == "Search Image":
        st.header("Search Images")
        st.write("Discover images that fit your project's needs with our powerful search tool.")
# μ΄ν•˜ μ½”λ“œλŠ” μœ„μ™€ λ™μΌν•œ νŒ¨ν„΄μœΌλ‘œ 'Image', 'Video', 'Sound', 'Scripts' 메뉴λ₯Ό μ²˜λ¦¬ν•©λ‹ˆλ‹€.

    elif st.session_state['current_sub_menu'] == "Search Image":
        st.header("Search Images")
        st.write("Discover images that fit your project's needs with our powerful search tool.")

# 'Image' 메뉴 선택 μ‹œ 처리 둜직
elif selected_menu == "Image":
    if st.session_state['current_sub_menu'] == "Generation":
        st.header("Image Generation")
        st.write("Generate images using AI.")
    elif st.session_state['current_sub_menu'] == "Face ID":
        st.header("Face ID")
        st.write("Identify and analyze faces in images.")
    elif st.session_state['current_sub_menu'] == "Inpainting":
        st.header("Inpainting")
        st.write("Fill in missing parts of images.")
    elif st.session_state['current_sub_menu'] == "Remove Background":
        st.header("Remove Background")
        st.write("Easily remove backgrounds from images.")
    elif st.session_state['current_sub_menu'] == "Studio":
        st.header("Image Studio")
        st.write("Access a suite of image editing tools.")

# 'Video' 메뉴 선택 μ‹œ 처리 둜직
elif selected_menu == "Video":
    if st.session_state['current_sub_menu'] == "Generation":
        st.header("Video Generation")
        st.write("Create videos with our generation tools.")
    elif st.session_state['current_sub_menu'] == "Talking Face":
        st.header("Talking Face Videos")
        st.write("Generate talking face videos from images.")
    elif st.session_state['current_sub_menu'] == "Remove Background":
        st.header("Video Background Removal")
        st.write("Remove backgrounds from your videos effortlessly.")
    elif st.session_state['current_sub_menu'] == "Studio":
        st.header("Video Studio")
        st.write("Explore our video editing studio for advanced editing.")

# 'Sound' 메뉴 선택 μ‹œ 처리 둜직
elif selected_menu == "Sound":
    if st.session_state['current_sub_menu'] == "Video SFX":
        st.header("Video Sound Effects")
        st.write("Enhance your videos with sound effects.")
    elif st.session_state['current_sub_menu'] == "Video Music":
        st.header("Video Music")
        st.write("Find the perfect music for your video content.")
    elif st.session_state['current_sub_menu'] == "TTS(Voice)":
        st.header("Text-to-Speech")
        st.write("Convert your text into natural-sounding voice.")
    elif st.session_state['current_sub_menu'] == "Image SFX":
        st.header("Image Sound Effects")
        st.write("Add sound effects to your images.")
    elif st.session_state['current_sub_menu'] == "Image Music":
        st.header("Image Music")
        st.write("Associate music tracks with your images.")

# 'Scripts' 메뉴 선택 μ‹œ 처리 둜직
elif selected_menu == "Scripts":
    st.header("Scripts")
    st.write("Script writing tools and resources.")