nakas commited on
Commit
2f6da70
1 Parent(s): 91a5b08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -238,13 +238,14 @@ def ui_full(launch_kwargs):
238
  cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
239
  with gr.Column():
240
  output = [
241
- gr.Audio(src=file_path, label=f"Generated Music {i+1}")
242
- for i, file_path in enumerate(files)
243
  ]
 
244
 
245
  submit.click(predict_full,
246
  inputs=[model, text, melody, duration, topk, topp, temperature, cfg_coef],
247
- outputs=[output])
248
  radio.change(toggle_audio_src, radio, [melody], queue=False, show_progress=False)
249
  gr.Examples(
250
  fn=predict_full,
@@ -276,7 +277,7 @@ def ui_full(launch_kwargs):
276
  ],
277
  ],
278
  inputs=[text, melody, model],
279
- outputs=[output]
280
  )
281
  gr.Markdown(
282
  """
 
238
  cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
239
  with gr.Column():
240
  output = [
241
+ gr.Audio(label=f"Generated Music {i+1}")
242
+ for i in range(len(files))
243
  ]
244
+ output_area = gr.Output(output)
245
 
246
  submit.click(predict_full,
247
  inputs=[model, text, melody, duration, topk, topp, temperature, cfg_coef],
248
+ outputs=[output_area.value]) # Use value attribute of output_area
249
  radio.change(toggle_audio_src, radio, [melody], queue=False, show_progress=False)
250
  gr.Examples(
251
  fn=predict_full,
 
277
  ],
278
  ],
279
  inputs=[text, melody, model],
280
+ outputs=[output_area.value], # Use value attribute of output_area
281
  )
282
  gr.Markdown(
283
  """