Pecorized commited on
Commit
7d7f38b
·
1 Parent(s): 0a42bb0
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -143,8 +143,8 @@ from audio_separator import Separator
143
 
144
  def inference(audio, vocals, bass, drums, other, piano, guitar, lead_vocals, backing_vocals):
145
  # Initially, show the loading GIF
146
- loading_gif_path = "./7RwF.gif"
147
- transparent_img_path = "./images.png"
148
 
149
  os.makedirs("out", exist_ok=True)
150
  audio_path = 'test.wav'
@@ -179,7 +179,8 @@ def inference(audio, vocals, bass, drums, other, piano, guitar, lead_vocals, bac
179
  }
180
 
181
  # Once processing is done, hide the GIF by returning a transparent image
182
- return [gr.Audio(stem_paths[stem], visible=bool(stem_paths[stem])) for stem in stem_paths] + [transparent_img_path]
 
183
 
184
  # Define checkboxes for each stem
185
  checkbox_labels = ["Full Vocals", "Bass", "Drums", "Other", "Piano", "Guitar", "Lead Vocals", "Backing Vocals"]
@@ -191,7 +192,7 @@ description = "Music Source Separation in the Waveform Domain. Upload your audio
191
  iface = gr.Interface(
192
  inference,
193
  [gr.components.Audio(type="numpy", label="Input")] + checkboxes,
194
- [gr.Audio(label=label, visible=False) for label in checkbox_labels] + [gr.Image()],
195
  title=title,
196
  description=description,
197
  )
 
143
 
144
  def inference(audio, vocals, bass, drums, other, piano, guitar, lead_vocals, backing_vocals):
145
  # Initially, show the loading GIF
146
+ loading_gif_path = "7RwF.gif"
147
+ gr.Image(loading_gif_path,visible=True)
148
 
149
  os.makedirs("out", exist_ok=True)
150
  audio_path = 'test.wav'
 
179
  }
180
 
181
  # Once processing is done, hide the GIF by returning a transparent image
182
+ gr.Image(visible=False)
183
+ return [gr.Audio(stem_paths[stem], visible=bool(stem_paths[stem])) for stem in stem_paths]
184
 
185
  # Define checkboxes for each stem
186
  checkbox_labels = ["Full Vocals", "Bass", "Drums", "Other", "Piano", "Guitar", "Lead Vocals", "Backing Vocals"]
 
192
  iface = gr.Interface(
193
  inference,
194
  [gr.components.Audio(type="numpy", label="Input")] + checkboxes,
195
+ [gr.Audio(label=label, visible=False) for label in checkbox_labels],
196
  title=title,
197
  description=description,
198
  )