awacke1 commited on
Commit
4ae744d
·
verified ·
1 Parent(s): 5fe1906

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +66 -0
app.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # App layout setup
4
+ st.set_page_config(layout="wide")
5
+
6
+ # Main Sidebar with menus
7
+ st.sidebar.title("Video Generation")
8
+ menu_options = ["Generate Video", "My Videos", "Settings", "Help"]
9
+ menu_selection = st.sidebar.radio("Menu", menu_options)
10
+
11
+ if menu_selection == "Generate Video":
12
+ st.sidebar.text_input("Enter Prompt", key="prompt")
13
+ st.sidebar.button("Save Preset")
14
+ st.sidebar.selectbox("Choose Preset", ["Preset 1", "Preset 2", "Preset 3"], key="preset")
15
+ if st.sidebar.button("Get More Credits"):
16
+ st.write("Redirecting to credits purchase...")
17
+
18
+ elif menu_selection == "My Videos":
19
+ st.sidebar.text("Videos in progress:")
20
+ st.sidebar.progress(75)
21
+ st.sidebar.text("Completed videos:")
22
+ video_list = ["Video1", "Video2"]
23
+ selected_video = st.sidebar.radio("Select Video", video_list)
24
+
25
+ elif menu_selection == "Settings":
26
+ st.sidebar.checkbox("Enable Notifications")
27
+ st.sidebar.checkbox("High Quality Rendering")
28
+
29
+ elif menu_selection == "Help":
30
+ st.sidebar.write("For assistance, please visit our help center.")
31
+
32
+ # Main area
33
+ st.title("Video Generator Dashboard")
34
+ st.text_area("Prompt", "Enter your video description here...", key="video_prompt")
35
+ st.number_input("Set Duration (seconds)", min_value=10, max_value=300, key="duration", value=10)
36
+ st.button("Generate Video")
37
+
38
+ # Video display area with tools
39
+ st.video([]) # Placeholder for video player
40
+ st.button("Refresh")
41
+ st.button("Download")
42
+ st.button("❤️")
43
+ st.button("Close")
44
+
45
+ # Right sidebar for video processing
46
+ with st.sidebar:
47
+ st.write("Credits: 3,465")
48
+ st.button("Get Credits")
49
+
50
+ st.subheader("Video Status")
51
+ video_processing = {"Video3": 91, "Video4": 75}
52
+ for video, progress in video_processing.items():
53
+ st.text(video)
54
+ st.progress(progress)
55
+
56
+ st.subheader("Completed Videos")
57
+ st.button("Video1")
58
+ st.button("Video2")
59
+
60
+ if st.button("Fill out a short survey"):
61
+ st.write("Redirecting to survey...")
62
+
63
+ # Footer with star rating
64
+ st.write("Rate this App")
65
+ st.slider("", 0, 5, 1)
66
+