Spaces:
Sleeping
Sleeping
import gradio as gr | |
def handler(in1, in2): | |
return in1, in2 | |
in1=gr.CheckboxGroup(label='擅長的程式語言1', | |
info='可複選', | |
choices=['Python', 'C#', 'C++', 'Java'], | |
value=['Python', 'C++']) | |
in2=gr.CheckboxGroup(label='擅長的程式語言2', | |
info='可複選', | |
choices=['PHP', 'ASP', 'JSP'], | |
value=['PHP', 'ASP'], | |
type='index') | |
out1=gr.Textbox(label='擅長的程式語言1') | |
out2=gr.Textbox(label='擅長的程式語言2') | |
iface=gr.Interface( | |
fn=handler, | |
inputs=[in1, in2], | |
outputs=[out1, out2], | |
title='Checkbox 元件測試', | |
allow_flagging='never', | |
) | |
iface.launch() | |