Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,12 @@ BATCHED_DURATION = 15
|
|
26 |
INTERRUPTING = False
|
27 |
# We have to wrap subprocess call to clean a bit the log when using gr.make_waveform
|
28 |
_old_call = sp.call
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
def _call_nostderr(*args, **kwargs):
|
32 |
# Avoid ffmpeg vomitting on the logs.
|
@@ -233,12 +238,8 @@ def ui_full(launch_kwargs):
|
|
233 |
temperature = gr.Number(label="Temperature", value=1.0, interactive=True)
|
234 |
cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
|
235 |
with gr.Column():
|
236 |
-
output = [
|
237 |
-
|
238 |
-
gr.Audio(audio_file2, label="Generated Music 2"),
|
239 |
-
gr.Audio(audio_file3, label="Generated Music 3"),
|
240 |
-
gr.Audio(audio_file4, label="Generated Music 4")
|
241 |
-
]
|
242 |
submit.click(predict_full,
|
243 |
inputs=[model, text, melody, duration, topk, topp, temperature, cfg_coef],
|
244 |
outputs=[output])
|
@@ -332,7 +333,7 @@ def ui_batched(launch_kwargs):
|
|
332 |
with gr.Row():
|
333 |
submit = gr.Button("Generate")
|
334 |
with gr.Column():
|
335 |
-
output = gr.Audio(label="Generated Music")
|
336 |
submit.click(predict_batched, inputs=[text, melody],
|
337 |
outputs=[output], batch=True, max_batch_size=MAX_BATCH_SIZE)
|
338 |
radio.change(toggle_audio_src, radio, [melody], queue=False, show_progress=False)
|
|
|
26 |
INTERRUPTING = False
|
27 |
# We have to wrap subprocess call to clean a bit the log when using gr.make_waveform
|
28 |
_old_call = sp.call
|
29 |
+
files = [
|
30 |
+
"./out/mdx_extra_q/test/vocals.wav",
|
31 |
+
"./out/mdx_extra_q/test/bass.wav",
|
32 |
+
"./out/mdx_extra_q/test/drums.wav",
|
33 |
+
"./out/mdx_extra_q/test/other.wav"
|
34 |
+
]
|
35 |
|
36 |
def _call_nostderr(*args, **kwargs):
|
37 |
# Avoid ffmpeg vomitting on the logs.
|
|
|
238 |
temperature = gr.Number(label="Temperature", value=1.0, interactive=True)
|
239 |
cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
|
240 |
with gr.Column():
|
241 |
+
output = [gr.Audio(file, label=f"Generated Music {i+1}") for i, file in enumerate(files)]
|
242 |
+
|
|
|
|
|
|
|
|
|
243 |
submit.click(predict_full,
|
244 |
inputs=[model, text, melody, duration, topk, topp, temperature, cfg_coef],
|
245 |
outputs=[output])
|
|
|
333 |
with gr.Row():
|
334 |
submit = gr.Button("Generate")
|
335 |
with gr.Column():
|
336 |
+
output = [gr.Audio(file, label=f"Generated Music {i+1}") for i, file in enumerate(files)]
|
337 |
submit.click(predict_batched, inputs=[text, melody],
|
338 |
outputs=[output], batch=True, max_batch_size=MAX_BATCH_SIZE)
|
339 |
radio.change(toggle_audio_src, radio, [melody], queue=False, show_progress=False)
|