Commit ·
f3a0543
1
Parent(s): 482b9b5
Fix UI crash: replace hidden gr.Number with gr.Textbox for regen_seg inputs
Browse filesgr.Number with visible=False triggers a Gradio 5 internal .split() error
on the number format string, breaking the UI layout. Use gr.Textbox('0')
instead — handlers already call int(seg_idx) so the cast is safe.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1763,7 +1763,7 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1763 |
taro_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1764 |
taro_btn = gr.Button("Generate", variant="primary")
|
| 1765 |
# Hidden regen plumbing — do NOT remove (used as typed inputs for regen handlers)
|
| 1766 |
-
taro_regen_seg = gr.
|
| 1767 |
taro_regen_state = gr.Textbox(value="", visible=False, elem_id="taro_regen_state")
|
| 1768 |
|
| 1769 |
with gr.Column():
|
|
@@ -1869,7 +1869,7 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1869 |
mma_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1870 |
mma_btn = gr.Button("Generate", variant="primary")
|
| 1871 |
# Hidden regen plumbing
|
| 1872 |
-
mma_regen_seg = gr.
|
| 1873 |
mma_regen_state = gr.Textbox(value="", visible=False, elem_id="mma_regen_state")
|
| 1874 |
|
| 1875 |
with gr.Column():
|
|
@@ -1959,7 +1959,7 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1959 |
hf_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1960 |
hf_btn = gr.Button("Generate", variant="primary")
|
| 1961 |
# Hidden regen plumbing
|
| 1962 |
-
hf_regen_seg = gr.
|
| 1963 |
hf_regen_state = gr.Textbox(value="", visible=False, elem_id="hf_regen_state")
|
| 1964 |
|
| 1965 |
with gr.Column():
|
|
|
|
| 1763 |
taro_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1764 |
taro_btn = gr.Button("Generate", variant="primary")
|
| 1765 |
# Hidden regen plumbing — do NOT remove (used as typed inputs for regen handlers)
|
| 1766 |
+
taro_regen_seg = gr.Textbox(value="0", visible=False, elem_id="taro_regen_seg")
|
| 1767 |
taro_regen_state = gr.Textbox(value="", visible=False, elem_id="taro_regen_state")
|
| 1768 |
|
| 1769 |
with gr.Column():
|
|
|
|
| 1869 |
mma_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1870 |
mma_btn = gr.Button("Generate", variant="primary")
|
| 1871 |
# Hidden regen plumbing
|
| 1872 |
+
mma_regen_seg = gr.Textbox(value="0", visible=False, elem_id="mma_regen_seg")
|
| 1873 |
mma_regen_state = gr.Textbox(value="", visible=False, elem_id="mma_regen_state")
|
| 1874 |
|
| 1875 |
with gr.Column():
|
|
|
|
| 1959 |
hf_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1960 |
hf_btn = gr.Button("Generate", variant="primary")
|
| 1961 |
# Hidden regen plumbing
|
| 1962 |
+
hf_regen_seg = gr.Textbox(value="0", visible=False, elem_id="hf_regen_seg")
|
| 1963 |
hf_regen_state = gr.Textbox(value="", visible=False, elem_id="hf_regen_state")
|
| 1964 |
|
| 1965 |
with gr.Column():
|