Spaces:
Runtime error
Runtime error
import streamlit as st | |
# App layout setup | |
st.set_page_config(layout="wide") | |
# Main Sidebar with menus | |
st.sidebar.title("Video Generation") | |
menu_options = ["Generate Video", "My Videos", "Settings", "Help"] | |
menu_selection = st.sidebar.radio("Menu", menu_options) | |
if menu_selection == "Generate Video": | |
st.sidebar.text_input("Enter Prompt", key="prompt") | |
st.sidebar.button("Save Preset") | |
st.sidebar.selectbox("Choose Preset", ["Preset 1", "Preset 2", "Preset 3"], key="preset") | |
if st.sidebar.button("Get More Credits"): | |
st.write("Redirecting to credits purchase...") | |
elif menu_selection == "My Videos": | |
st.sidebar.text("Videos in progress:") | |
st.sidebar.progress(75) | |
st.sidebar.text("Completed videos:") | |
video_list = ["Video1", "Video2"] | |
selected_video = st.sidebar.radio("Select Video", video_list) | |
elif menu_selection == "Settings": | |
st.sidebar.checkbox("Enable Notifications") | |
st.sidebar.checkbox("High Quality Rendering") | |
elif menu_selection == "Help": | |
st.sidebar.write("For assistance, please visit our help center.") | |
# Main area | |
st.title("Video Generator Dashboard") | |
st.text_area("Prompt", "Enter your video description here...", key="video_prompt") | |
st.number_input("Set Duration (seconds)", min_value=10, max_value=300, key="duration", value=10) | |
st.button("Generate Video") | |
# Video display area with tools | |
st.video([]) # Placeholder for video player | |
st.button("Refresh") | |
st.button("Download") | |
st.button("❤️") | |
st.button("Close") | |
# Right sidebar for video processing | |
with st.sidebar: | |
st.write("Credits: 3,465") | |
st.button("Get Credits") | |
st.subheader("Video Status") | |
video_processing = {"Video3": 91, "Video4": 75} | |
for video, progress in video_processing.items(): | |
st.text(video) | |
st.progress(progress) | |
st.subheader("Completed Videos") | |
st.button("Video1") | |
st.button("Video2") | |
if st.button("Fill out a short survey"): | |
st.write("Redirecting to survey...") | |
# Footer with star rating | |
st.write("Rate this App") | |
st.slider("", 0, 5, 1) | |