gradio_slider_1 / app.py
tony1966's picture
initial commit
74e682c verified
raw
history blame contribute delete
433 Bytes
import gradio as gr
def handler(in1, in2):
return in1, in2
in1=gr.Slider(label='數值輸入 1')
in2=gr.Slider(label='數值輸入 2', minimum=-10, value=0, maximum=10, step=0.1)
out1=gr.Textbox(label='數值輸出 1')
out2=gr.Textbox(label='數值輸出 2')
iface=gr.Interface(
fn=handler,
inputs=[in1, in2],
outputs=[out1, out2],
title='Slider 元件測試',
allow_flagging='never',
)
iface.launch()