Spaces:
Sleeping
Sleeping
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.") |