multimodalart HF Staff Claude Opus 4.7 (1M context) commited on
Commit
d4e73fa
·
1 Parent(s): 4254e77

Stream tqdm progress to Gradio UI

Browse files

Add progress=gr.Progress(track_tqdm=True) to each @spaces.GPU handler
(generate, voice_design, voice_clone, generate_raw) so tqdm bars from
the inference path surface as progress in the UI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -302,6 +302,7 @@ def generate(
302
  background_sfx: bool,
303
  validate: bool,
304
  skip_vc: bool,
 
305
  ):
306
  if not voice.strip():
307
  raise gr.Error("Voice description is required.")
@@ -331,6 +332,7 @@ def voice_design(
331
  scene: str,
332
  language: str,
333
  seed: int,
 
334
  ):
335
  if not voice.strip():
336
  raise gr.Error("Voice description is required.")
@@ -363,6 +365,7 @@ def voice_clone(
363
  vc_cfg_rate: float,
364
  background_sfx: bool,
365
  validate: bool,
 
366
  ):
367
  if not voice.strip():
368
  raise gr.Error("Voice description is required.")
@@ -406,6 +409,7 @@ def generate_raw(
406
  background_sfx: bool,
407
  validate: bool,
408
  skip_vc: bool,
 
409
  ):
410
  if not raw_xml.strip():
411
  raise gr.Error("Prompt XML is required.")
 
302
  background_sfx: bool,
303
  validate: bool,
304
  skip_vc: bool,
305
+ progress=gr.Progress(track_tqdm=True),
306
  ):
307
  if not voice.strip():
308
  raise gr.Error("Voice description is required.")
 
332
  scene: str,
333
  language: str,
334
  seed: int,
335
+ progress=gr.Progress(track_tqdm=True),
336
  ):
337
  if not voice.strip():
338
  raise gr.Error("Voice description is required.")
 
365
  vc_cfg_rate: float,
366
  background_sfx: bool,
367
  validate: bool,
368
+ progress=gr.Progress(track_tqdm=True),
369
  ):
370
  if not voice.strip():
371
  raise gr.Error("Voice description is required.")
 
409
  background_sfx: bool,
410
  validate: bool,
411
  skip_vc: bool,
412
+ progress=gr.Progress(track_tqdm=True),
413
  ):
414
  if not raw_xml.strip():
415
  raise gr.Error("Prompt XML is required.")