amirgame197 commited on
Commit
9e2fea4
·
verified ·
1 Parent(s): 6f1bbcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -107,13 +107,15 @@ selected_stem_count = st.radio("Stem count", (2,4,5))
107
 
108
  if uploaded_file is not None:
109
 
110
- with tempfile.NamedTemporaryFile(delete=False) as temp_file:
111
- temp_file.write(uploaded_file.read())
112
- temp_file_path = temp_file.name
113
 
114
- separate_audios = separate_audio_by_stem(temp_file_path, selected_stem_count)
115
-
116
- st.write("Output Files:")
117
- for audio in separate_audios:
118
- st.write(audio['description'])
119
- st.audio(audio['path'], format="audio/wav", start_time=0)
 
 
 
 
 
107
 
108
  if uploaded_file is not None:
109
 
110
+ if st.button("Submit"):
 
 
111
 
112
+ with tempfile.NamedTemporaryFile(delete=False) as temp_file:
113
+ temp_file.write(uploaded_file.read())
114
+ temp_file_path = temp_file.name
115
+
116
+ separate_audios = separate_audio_by_stem(temp_file_path, selected_stem_count)
117
+
118
+ st.write("Output Files:")
119
+ for audio in separate_audios:
120
+ st.write(audio['description'])
121
+ st.audio(audio['path'], format="audio/wav", start_time=0)