Spaces:
Running
Running
bubbliiiing
commited on
Commit
·
20f746d
1
Parent(s):
2dd5165
fix bug in gradio edition
Browse files- easyanimate/ui/ui.py +5 -1
easyanimate/ui/ui.py
CHANGED
@@ -790,7 +790,11 @@ def ui_eas(edition, config_path, model_name, savedir_sample):
|
|
790 |
with gr.Row():
|
791 |
seed_textbox = gr.Textbox(label="Seed", value=43)
|
792 |
seed_button = gr.Button(value="\U0001F3B2", elem_classes="toolbutton")
|
793 |
-
seed_button.click(
|
|
|
|
|
|
|
|
|
794 |
|
795 |
generate_button = gr.Button(value="Generate", variant='primary')
|
796 |
|
|
|
790 |
with gr.Row():
|
791 |
seed_textbox = gr.Textbox(label="Seed", value=43)
|
792 |
seed_button = gr.Button(value="\U0001F3B2", elem_classes="toolbutton")
|
793 |
+
seed_button.click(
|
794 |
+
fn=lambda: gr.Textbox(value=random.randint(1, 1e8)) if gradio_version_is_above_4 else gr.Textbox.update(value=random.randint(1, 1e8)),
|
795 |
+
inputs=[],
|
796 |
+
outputs=[seed_textbox]
|
797 |
+
)
|
798 |
|
799 |
generate_button = gr.Button(value="Generate", variant='primary')
|
800 |
|