Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -114,16 +114,18 @@ selected_stem_count = st.radio("Select stem count", (2,4,5))
|
|
114 |
|
115 |
if uploaded_file is not None:
|
116 |
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
for audio in separate_audios:
|
128 |
-
st.write(audio['description'])
|
129 |
-
st.audio(audio['path'], format="audio/wav", start_time=0)
|
|
|
114 |
|
115 |
if uploaded_file is not None:
|
116 |
|
117 |
+
if st.button("Submit"):
|
118 |
+
|
119 |
+
# Save the uploaded file to a temporary location
|
120 |
+
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
|
121 |
+
temp_file.write(uploaded_file.read())
|
122 |
+
temp_file_path = temp_file.name
|
123 |
+
|
124 |
+
# Process the uploaded audio file
|
125 |
+
separate_audios = separate_audio_by_stem(temp_file_path, selected_stem_count)
|
126 |
|
127 |
+
# Display the output files for download
|
128 |
+
st.write("Output Files:")
|
129 |
+
for audio in separate_audios:
|
130 |
+
st.write(audio['description'])
|
131 |
+
st.audio(audio['path'], format="audio/wav", start_time=0)
|
|
|
|
|
|