File size: 491 Bytes
6849423
 
 
1cd6ea1
a78a11d
e8453f9
 
6849423
ca150b2
a78a11d
ca150b2
 
 
 
 
 
 
 
2cbc072
ca150b2
 
a78a11d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr

def greet(name):
    return "Hello " + name + "!! " 

def greet1(name):
    return "Hello ya client" +name

iface = gr.Blocks()

with iface:
    name = gr.Textbox(label="Name")
    output = gr.Textbox(label="Output Box")

    greet_btn = gr.Button("Greet")
    greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")

    greet1_btn = gr.Button("Greet1")
    greet1_btn.click(fn=greet1, inputs=name, outputs=output, api_name="testing")

iface.launch()