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