Skip to content

Commit

Permalink
testing new bs
Browse files Browse the repository at this point in the history
  • Loading branch information
adefossez committed Jun 9, 2023
1 parent 7d611c4 commit a962cd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app_batched.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def predict(texts, melodies):
for output in outputs:
with NamedTemporaryFile("wb", suffix=".wav", delete=False) as file:
audio_write(file.name, output, MODEL.sample_rate, strategy="loudness", add_suffix=False)
out_files.append([file.name])
return out_files
out_files.append(file.name)
return [out_files]


with gr.Blocks() as demo:
Expand Down Expand Up @@ -99,7 +99,7 @@ def predict(texts, melodies):
submit = gr.Button("Submit")
with gr.Column():
output = gr.Audio(label="Generated Music", type="filepath", format="wav")
submit.click(predict, inputs=[text, melody], outputs=[output], batch=True, max_batch_size=1)
submit.click(predict, inputs=[text, melody], outputs=[output], batch=True, max_batch_size=12)
gr.Examples(
fn=predict,
examples=[
Expand Down

0 comments on commit a962cd6

Please sign in to comment.