first_test / app.py
interiv@qq.com
增加第一个文件
8c3d7e3
raw
history blame contribute delete
No virus
297 Bytes
import gradio as gr
import numpy as np
def my_add(a, b):
return a + b
with gr.Blocks() as myblock:
a = gr.Slider(minimum=0, maximum=10)
b = gr.Slider(minimum=0, maximum=10)
c = gr.Label()
button=gr.Button(label="Click me")
button.click(my_add,[a, b], c)
myblock.launch( )