awacke1 commited on
Commit
b00a0ed
Β·
verified Β·
1 Parent(s): 65297c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -34
app.py CHANGED
@@ -2,56 +2,59 @@ import streamlit as st
2
 
3
  # Sidebar
4
  st.sidebar.title("Suno")
5
- st.sidebar.button("Home")
6
- st.sidebar.button("Create")
7
- st.sidebar.button("Library")
8
- st.sidebar.button("Explore (BETA)")
9
  st.sidebar.markdown("---")
10
- st.sidebar.write("2360 credits")
11
- st.sidebar.button("Subscription")
12
- st.sidebar.button("What's New?")
13
- st.sidebar.button("Community")
14
- st.sidebar.button("Help")
15
- st.sidebar.button("About")
16
 
17
- # Main content
18
  st.title("Create")
19
-
20
- # Form
21
- st.subheader("Custom Mode")
22
- custom_mode = st.checkbox("Custom Mode")
23
-
24
- st.subheader("Song Description")
25
- song_description = st.text_area("Song Description", "a futuristic anime song about a literal banana")
26
-
27
- instrumental = st.checkbox("Instrumental")
28
-
29
- version = st.selectbox("Version", ["v3", "v2", "v1"])
30
  st.button("Create 🎡")
31
 
32
- # Song list
33
  songs = [
34
  {"title": "Dance Under The Moonlight", "description": "acoustic guitar flamenco dance beat kizomba soaring vocalist progressive house", "version": "v3"},
35
  {"title": "The Tale of Yggdrasil", "description": "folk acoustic storytelling", "version": "v3"},
36
  {"title": "The Song of Yggdrasil", "description": "tropical latin acoustic", "version": "v3"},
37
- {"title": "The Song of Yggdrasil", "description": "tropical latin acoustic", "version": "v3"},
38
  {"title": "Sacred Frequencies", "description": "progressive edm uplifting", "version": "v3"},
39
  {"title": "Let's Get Jokin'", "description": "progressive house electronic dubstep", "version": "v3"},
40
  {"title": "Jokes That Make You Dance", "description": "marching band progressive house dance", "version": "v3"},
41
  {"title": "Joke Parade", "description": "progressive house dance 128bpm marching band bass drum dubstep", "version": "v3"},
42
- {"title": "Joke Parade", "description": "progressive house dance 128bpm marching band bass drum dubstep", "version": "v3"},
43
  {"title": "Laughing On The Dancefloor", "description": "128bpm progressive house dance", "version": "v3"},
44
  ]
45
 
46
  for i, song in enumerate(songs):
47
- st.image("https://via.placeholder.com/50", width=50) # Placeholder for song image
48
- st.write(f"**{song['title']}**")
49
- st.write(song['description'])
50
- st.write(f"Version: {song['version']}")
51
- st.button("Extend", key=f"extend_{i}")
52
- st.checkbox("Public", key=f"public_{i}")
53
- st.button("πŸ‘", key=f"thumbs_up_{i}")
54
- st.button("πŸ‘Ž", key=f"thumbs_down_{i}")
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  # Preview section
57
  st.sidebar.markdown("---")
@@ -61,5 +64,7 @@ st.sidebar.write("Select a song to preview.")
61
 
62
  # Inject process methods steps and input
63
  st.image("Suno.png")
64
- st.write('This example tests AIPP and GPT4o text and image prompts to take a screenshot and produce a one shot app using streamlit and python app. Prompt: Provide a development analysis of the layout of this html5 web app and create a streamlit python UI that duplicates exactly the layout features and text of each UI element.')
 
 
65
 
 
2
 
3
  # Sidebar
4
  st.sidebar.title("Suno")
5
+ st.sidebar.markdown("### Home")
6
+ st.sidebar.markdown("### Create")
7
+ st.sidebar.markdown("### Library")
8
+ st.sidebar.markdown("### Explore (BETA)")
9
  st.sidebar.markdown("---")
10
+ st.sidebar.markdown("2360 credits")
11
+ st.sidebar.markdown("### Subscription")
12
+ st.sidebar.markdown("### What's New? 5")
13
+ st.sidebar.markdown("### Community")
14
+ st.sidebar.markdown("### Help")
15
+ st.sidebar.markdown("### About")
16
 
17
+ # Main Content Area
18
  st.title("Create")
19
+ st.checkbox("Custom Mode", key="custom_mode")
20
+ st.text_area("Song Description", "a futuristic anime song about a literal banana", key="song_description")
21
+ st.radio("Instrumental", ["Yes", "No"], key="instrumental")
22
+ st.selectbox("Version", ["v1", "v2", "v3"], key="version")
 
 
 
 
 
 
 
23
  st.button("Create 🎡")
24
 
25
+ # Song List
26
  songs = [
27
  {"title": "Dance Under The Moonlight", "description": "acoustic guitar flamenco dance beat kizomba soaring vocalist progressive house", "version": "v3"},
28
  {"title": "The Tale of Yggdrasil", "description": "folk acoustic storytelling", "version": "v3"},
29
  {"title": "The Song of Yggdrasil", "description": "tropical latin acoustic", "version": "v3"},
 
30
  {"title": "Sacred Frequencies", "description": "progressive edm uplifting", "version": "v3"},
31
  {"title": "Let's Get Jokin'", "description": "progressive house electronic dubstep", "version": "v3"},
32
  {"title": "Jokes That Make You Dance", "description": "marching band progressive house dance", "version": "v3"},
33
  {"title": "Joke Parade", "description": "progressive house dance 128bpm marching band bass drum dubstep", "version": "v3"},
 
34
  {"title": "Laughing On The Dancefloor", "description": "128bpm progressive house dance", "version": "v3"},
35
  ]
36
 
37
  for i, song in enumerate(songs):
38
+ cols = st.columns([1, 3, 1, 1, 1, 1])
39
+ with cols[0]:
40
+ st.image("https://via.placeholder.com/50", width=50)
41
+ with cols[1]:
42
+ st.markdown(f"**{song['title']}**")
43
+ st.markdown(f"*{song['description']}*")
44
+ with cols[2]:
45
+ st.markdown(f"v{song['version']}")
46
+ with cols[3]:
47
+ st.button("Extend", key=f"extend_{i}")
48
+ with cols[4]:
49
+ st.markdown("Public")
50
+ st.checkbox("", key=f"public_{i}")
51
+ with cols[5]:
52
+ st.button("πŸ‘", key=f"like_{i}")
53
+ st.button("πŸ‘Ž", key=f"dislike_{i}")
54
+
55
+ # Right Panel
56
+ st.markdown("---")
57
+ st.markdown("### Select a song to preview.")
58
 
59
  # Preview section
60
  st.sidebar.markdown("---")
 
64
 
65
  # Inject process methods steps and input
66
  st.image("Suno.png")
67
+ prompt = 'Provide a development analysis of the layout of this html5 web app and create a streamlit python UI that duplicates exactly the layout features and text of each UI element. Generate unique keys for repeating elements like the thumbs up emoji which shows on multiple content lines. For content lines as well use st.columns or a table to align UI elements in rows to match image'
68
+ st.write('This example tests AIPP and GPT4o text and image prompts to take a screenshot and produce a one shot app using streamlit and python app.')
69
+ st.write('Prompt: ' + prompt)
70