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

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

in1=gr.Number(label='數值輸入 1')
in2=gr.Number(label='數值輸入 2', minimum=0, value=5, maximum=10)
out1=gr.Number(label='數值輸出 1')
out2=gr.Number(label='數值輸出 2')
iface=gr.Interface(
    fn=handler,
    inputs=[in1, in2],  
    outputs=[out1, out2],
    title='Number 元件測試',
    allow_flagging='never',
    )
iface.launch()