File size: 553 Bytes
e2619ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()