chatui-helper / test_minimal.py
milwright's picture
Update dependencies and fix compatibility issues
e2619ba
raw
history blame
553 Bytes
import gradio as gr
# Minimal test to isolate the boolean iteration error
with gr.Blocks() as demo:
with gr.Tab("Test"):
name = gr.Textbox(label="Name")
checkbox = gr.Checkbox(label="Test", value=False)
button = gr.Button("Test")
def test_func(name_val, checkbox_val):
return f"Hello {name_val}, checkbox: {checkbox_val}"
button.click(
test_func,
inputs=[name, checkbox],
outputs=[name]
)
if __name__ == "__main__":
demo.launch()