Spaces:
Sleeping
Sleeping
Commit ·
be75b09
1
Parent(s): 4e77f57
fix: remove gr.Group from outputs — fixes silent button click failure
Browse filesGradio 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>
app.py
CHANGED
|
@@ -532,28 +532,28 @@ with gr.Blocks(
|
|
| 532 |
)
|
| 533 |
|
| 534 |
# ── Result section ───────────────────────────────────────────────────────
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 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("""
|