amirgame197 commited on
Commit
91ec1ca
·
verified ·
1 Parent(s): 720b94c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -32,12 +32,15 @@ def separate_audio(audio_path, stem_count):
32
  if stem_count == 5:
33
  paths.append(('Piano', f"{gradio_temp_path}/separated_audio/{randomnumber}/piano.wav"))
34
 
35
- return paths
 
 
 
36
 
37
  iface = gr.Interface(
38
  fn=separate_audio,
39
- inputs=[gr.Audio(type="filepath"), gr.Radio([2, 4, 5])],
40
- outputs="text",
41
  )
42
 
43
  iface.launch()
 
32
  if stem_count == 5:
33
  paths.append(('Piano', f"{gradio_temp_path}/separated_audio/{randomnumber}/piano.wav"))
34
 
35
+ audio_outputs = []
36
+ for label, filepath in paths:
37
+ audio_outputs.append(gr.outputs.Audio(filepath, label=label))
38
+ return audio_outputs
39
 
40
  iface = gr.Interface(
41
  fn=separate_audio,
42
+ inputs=[gr.Audio(type="filepath"), gr.Radio([2, 4, 5], label="Number of Stems")],
43
+ outputs="text", # Changed to "text" temporarily for testing
44
  )
45
 
46
  iface.launch()