amirgame197 commited on
Commit
89ee134
·
verified ·
1 Parent(s): 79c4319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -108,18 +108,18 @@ selected_stem_count = 2
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)
 
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)