rbarman commited on
Commit
20d74ef
1 Parent(s): a6d7026

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -42,8 +42,14 @@ st.write("Upload an audio file (.wav)")
42
  uploaded_file = st.file_uploader("Choose a file", type=["wav","mp3"])
43
 
44
  if uploaded_file is not None:
 
 
 
 
 
 
45
  # Process the uploaded audio file
46
- vocals_path, accompaniment_path = separate_audio(uploaded_file)
47
 
48
  # Display the output files for download
49
  st.write("Output Files:")
 
42
  uploaded_file = st.file_uploader("Choose a file", type=["wav","mp3"])
43
 
44
  if uploaded_file is not None:
45
+
46
+ # Save the uploaded file to a temporary location
47
+ with tempfile.NamedTemporaryFile(delete=False) as temp_file:
48
+ temp_file.write(uploaded_file.read())
49
+ temp_file_path = temp_file.name
50
+
51
  # Process the uploaded audio file
52
+ vocals_path, accompaniment_path = separate_audio(temp_file_path)
53
 
54
  # Display the output files for download
55
  st.write("Output Files:")