Skip to content

Commit

Permalink
fix(webui): specify every interactive=True (fix #482)
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jun 27, 2024
1 parent 8397c5e commit 1a5426a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions examples/web/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def main():
)

with gr.Row():
refine_text_checkbox = gr.Checkbox(label="Refine text", value=True)
refine_text_checkbox = gr.Checkbox(label="Refine text", value=True, interactive=True)
temperature_slider = gr.Slider(
minimum=0.00001,
maximum=1.0,
Expand All @@ -54,7 +54,7 @@ def main():

with gr.Row():
voice_selection = gr.Dropdown(
label="Timbre", choices=voices.keys(), value="Default"
label="Timbre", choices=voices.keys(), value="Default", interactive=True,
)
audio_seed_input = gr.Number(
value=2,
Expand All @@ -63,15 +63,15 @@ def main():
minimum=seed_min,
maximum=seed_max,
)
generate_audio_seed = gr.Button("\U0001F3B2")
generate_audio_seed = gr.Button("\U0001F3B2", interactive=True)
text_seed_input = gr.Number(
value=42,
label="Text Seed",
interactive=True,
minimum=seed_min,
maximum=seed_max,
)
generate_text_seed = gr.Button("\U0001F3B2")
generate_text_seed = gr.Button("\U0001F3B2", interactive=True)

with gr.Row():
spk_emb_text = gr.Textbox(
Expand All @@ -88,20 +88,20 @@ def main():
interactive=True,
scale=2,
)
reload_chat_button = gr.Button("Reload", scale=1)
reload_chat_button = gr.Button("Reload", scale=1, interactive=True)

with gr.Row():
auto_play_checkbox = gr.Checkbox(label="Auto Play", value=False, scale=1)
auto_play_checkbox = gr.Checkbox(label="Auto Play", value=False, scale=1, interactive=True)
stream_mode_checkbox = gr.Checkbox(
label="Stream Mode", value=False, scale=1
label="Stream Mode", value=False, scale=1, interactive=True,
)
generate_button = gr.Button("Generate", scale=2, variant="primary")
generate_button = gr.Button("Generate", scale=2, variant="primary", interactive=True)
interrupt_button = gr.Button(
"Interrupt", scale=2, variant="stop", visible=False, interactive=False
"Interrupt", scale=2, variant="stop", visible=False, interactive=False,
)

text_output = gr.Textbox(
label="Output Text", interactive=False, show_copy_button=True
label="Output Text", interactive=False, show_copy_button=True,
)

# 使用Gradio的回调功能来更新数值输入框
Expand Down

0 comments on commit 1a5426a

Please sign in to comment.