Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,24 @@ st.sidebar.title("Settings")
|
|
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('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
st.markdown("---")
|
51 |
|
|
|
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('Upload your audio file to process with AudioLDM2 or StableAudio')
|
49 |
+
|
50 |
+
uploaded_file = st.file_uploader("Choose an audio file", type=["wav", "mp3", "ogg"])
|
51 |
+
model_choice = st.selectbox('Choose a model for processing', ('AudioLDM2', 'StableAudio'))
|
52 |
+
|
53 |
+
if uploaded_file is not None:
|
54 |
+
st.audio(uploaded_file, format="audio/mpeg")
|
55 |
+
|
56 |
+
# Dummy processing function to demonstrate functionality
|
57 |
+
def process_audio(file, model):
|
58 |
+
# Replace this with actual audio processing code
|
59 |
+
processed_audio_path = "processed_audio.wav"
|
60 |
+
return processed_audio_path
|
61 |
+
|
62 |
+
if st.button('Process Audio'):
|
63 |
+
processed_audio = process_audio(uploaded_file, model_choice)
|
64 |
+
st.audio(processed_audio, format="audio/mpeg", loop=False)
|
65 |
+
st.download_button(label="Download Processed Audio", data=processed_audio, file_name="processed_audio.wav", mime="audio/wav")
|
66 |
|
67 |
st.markdown("---")
|
68 |
|