gradio_number_1 / app.py
tony1966's picture
initial commit
e5ab7ce verified
raw
history blame contribute delete
420 Bytes
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()