Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,23 @@ background-attachment: local;
|
|
| 12 |
[data-testid="stHeader"] {{
|
| 13 |
background: rgba(0,0,0,0);
|
| 14 |
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
</style>
|
| 16 |
"""
|
| 17 |
|
|
@@ -19,87 +36,31 @@ st.markdown(page_bg_img, unsafe_allow_html=True)
|
|
| 19 |
|
| 20 |
audioldm_exmples_input_paths = []
|
| 21 |
audioldm_exmples_original_paths = []
|
| 22 |
-
exmples_prompts = ["wiwi", "pipi","wifi"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
-
st.
|
| 26 |
-
add_selectbox = st.sidebar.selectbox(
|
| 27 |
-
'How would you like to be contacted?',
|
| 28 |
-
('Email', 'Home phone', 'Mobile phone')
|
| 29 |
-
)
|
| 30 |
|
| 31 |
-
|
| 32 |
-
add_slider = st.sidebar.slider(
|
| 33 |
-
'Select a range of values',
|
| 34 |
-
0.0, 100.0, (25.0, 75.0)
|
| 35 |
-
)
|
| 36 |
-
st.subheader('This is a subheader with a divider', divider='rainbow')
|
| 37 |
-
with st.container(border = True, height=len(exmples_prompts)*200):
|
| 38 |
-
st.title("Examples")
|
| 39 |
-
col1, col2, col3, col4 = st.columns(4)
|
| 40 |
-
with col1:
|
| 41 |
-
st.subheader("original audio")
|
| 42 |
-
# with st.container(border = True,height=120):
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
# st.write("some prompts...")
|
| 47 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 48 |
-
with col2:
|
| 49 |
-
st.subheader("Separated Audio")
|
| 50 |
-
# with st.container(border = True,height=120):
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
# # st.write("some prompts...")
|
| 55 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 56 |
-
with col3:
|
| 57 |
-
st.subheader("AudioLDM2")
|
| 58 |
-
# with st.container(border = True,height=120):
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
# st.write("some prompts...")
|
| 68 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 69 |
-
# st.write("some prompts...")
|
| 70 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 71 |
-
for p in exmples_prompts:
|
| 72 |
-
with st.container(border = True,height=120):
|
| 73 |
-
st.write(p)
|
| 74 |
-
col1, col2, col3, col4 = st.columns(4)
|
| 75 |
-
with col1:
|
| 76 |
-
# st.write("some prompts...")
|
| 77 |
-
st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 78 |
-
# st.write("some prompts...")
|
| 79 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 80 |
-
with col2:
|
| 81 |
-
# st.subheader("Separated Audio")
|
| 82 |
-
# with st.container(border = True,height=120):
|
| 83 |
-
|
| 84 |
-
# st.write("some prompts...")
|
| 85 |
-
st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 86 |
-
# st.write("some prompts...")
|
| 87 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 88 |
-
with col3:
|
| 89 |
-
# st.subheader("AudioLDM2")
|
| 90 |
-
# with st.container(border = True,height=120):
|
| 91 |
-
|
| 92 |
-
# st.write("some prompts...")
|
| 93 |
-
st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 94 |
-
# st.write("some prompts...")
|
| 95 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 96 |
-
with col4:
|
| 97 |
-
# st.subheader("StableAudio")
|
| 98 |
-
# with st.container(border = True,height=120):
|
| 99 |
-
# st.write("some prompts...")
|
| 100 |
-
st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 101 |
-
# st.write("some prompts...")
|
| 102 |
-
# st.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
|
|
|
| 12 |
[data-testid="stHeader"] {{
|
| 13 |
background: rgba(0,0,0,0);
|
| 14 |
}}
|
| 15 |
+
[data-testid="stSidebar"] > div:first-child {{
|
| 16 |
+
background-color: rgba(255, 255, 255, 0.5);
|
| 17 |
+
border-radius: 10px;
|
| 18 |
+
padding: 10px;
|
| 19 |
+
}}
|
| 20 |
+
[data-testid="stSidebar"] > div {{
|
| 21 |
+
background-color: rgba(255, 255, 255, 0.8);
|
| 22 |
+
border-radius: 10px;
|
| 23 |
+
}}
|
| 24 |
+
.stTitle {{
|
| 25 |
+
color: #ffffff;
|
| 26 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
| 27 |
+
}}
|
| 28 |
+
.stSubheader {{
|
| 29 |
+
color: #ffffff;
|
| 30 |
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
| 31 |
+
}}
|
| 32 |
</style>
|
| 33 |
"""
|
| 34 |
|
|
|
|
| 36 |
|
| 37 |
audioldm_exmples_input_paths = []
|
| 38 |
audioldm_exmples_original_paths = []
|
| 39 |
+
exmples_prompts = ["wiwi", "pipi", "wifi"]
|
| 40 |
+
|
| 41 |
+
st.title('Drums Generation in Different Models')
|
| 42 |
+
st.sidebar.title("Settings")
|
| 43 |
+
|
| 44 |
+
# Sidebar elements
|
| 45 |
+
st.sidebar.selectbox('How would you like to be contacted?', ('Email', 'Home phone', 'Mobile phone'))
|
| 46 |
+
st.sidebar.slider('Select a range of values', 0.0, 100.0, (25.0, 75.0))
|
| 47 |
|
| 48 |
+
st.subheader('This is a subheader with a rainbow divider')
|
| 49 |
|
| 50 |
+
st.markdown("---")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
st.header("Examples")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
example_columns = st.columns(4)
|
| 55 |
+
example_titles = ["Original Audio", "Separated Audio", "AudioLDM2", "StableAudio"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
for col, title in zip(example_columns, example_titles):
|
| 58 |
+
col.subheader(title)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
for p in exmples_prompts:
|
| 61 |
+
with st.container():
|
| 62 |
+
st.write(f"Prompt: {p}")
|
| 63 |
+
audio_columns = st.columns(4)
|
| 64 |
+
for col in audio_columns:
|
| 65 |
+
col.audio("goodres.wav", format="audio/mpeg", loop=False)
|
| 66 |
+
st.markdown("<hr style='border: 1px solid #ddd;'>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|