File size: 365 Bytes
e923f00
 
 
 
f483fb5
e923f00
 
 
2120f24
 
 
 
 
e923f00
 
 
101c456
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr


def greet(name):
	return f"Hello {name}! 👋"


with gr.Blocks() as demo:
	gr.Markdown("# Greeting demo\nType a name and press Submit")
	name = gr.Textbox(label="Name")
	out = gr.Textbox(label="Output")
	submit = gr.Button("Submit")
	submit.click(fn=greet, inputs=name, outputs=out)


if __name__ == "__main__":
	demo.launch()