HeshamHaroon Claude Opus 4.6 (1M context) commited on
Commit
be75b09
·
1 Parent(s): 4e77f57

fix: remove gr.Group from outputs — fixes silent button click failure

Browse files

Gradio 5.x has a known bug where output components inside gr.Group()
break API schema introspection, causing click handlers to silently
do nothing. This was previously fixed in commit ffef688 but was
reintroduced during the full rewrite.

Also removed visible=False from video/audio outputs — Gradio handles
empty state correctly without it.

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

Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -532,28 +532,28 @@ with gr.Blocks(
532
  )
533
 
534
  # ── Result section ───────────────────────────────────────────────────────
535
- with gr.Group():
536
- gr.Markdown("### RESULT")
537
- with gr.Row():
538
- video_output = gr.Video(
539
- label="Dubbed video",
540
- visible=False,
541
- )
542
- audio_output = gr.Audio(
543
- label="Dubbed audio",
544
- visible=False,
545
- )
546
- with gr.Row():
547
- srt_preview = gr.Textbox(
548
- label="Subtitles (SRT)",
549
- lines=10,
550
- interactive=False,
551
- show_copy_button=True,
552
- )
553
- srt_download = gr.File(
554
- label="Download SRT",
555
- file_types=[".srt"],
556
- )
557
 
558
  # ── Footer ───────────────────────────────────────────────────────────────
559
  gr.HTML("""
 
532
  )
533
 
534
  # ── Result section ───────────────────────────────────────────────────────
535
+ # NOTE: Do NOT wrap outputs in gr.Group() — Gradio 5.x has a bug where
536
+ # output components inside gr.Group break API schema introspection,
537
+ # causing click handlers to silently do nothing.
538
+ gr.Markdown("### RESULT")
539
+ with gr.Row():
540
+ video_output = gr.Video(
541
+ label="Dubbed video",
542
+ )
543
+ audio_output = gr.Audio(
544
+ label="Dubbed audio",
545
+ )
546
+ with gr.Row():
547
+ srt_preview = gr.Textbox(
548
+ label="Subtitles (SRT)",
549
+ lines=10,
550
+ interactive=False,
551
+ show_copy_button=True,
552
+ )
553
+ srt_download = gr.File(
554
+ label="Download SRT",
555
+ file_types=[".srt"],
556
+ )
557
 
558
  # ── Footer ───────────────────────────────────────────────────────────────
559
  gr.HTML("""