File size: 451 Bytes
cd6f12b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr

def handler(in1, in2):
    return in1, in2

in1=gr.Checkbox(info='婚姻狀況', label='已婚', value=True)
in2=gr.Checkbox(info='周年慶優惠', label='買一送一', interactive=False)
out1=gr.Textbox(label='已婚')
out2=gr.Textbox(label='買一送一')
iface=gr.Interface(
    fn=handler,
    inputs=[in1, in2],  
    outputs=[out1, out2],
    title='Checkbox 元件測試',
    allow_flagging='never',
    )
iface.launch()