inoid commited on
Commit
44ca16b
1 Parent(s): f94e274

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -4,4 +4,17 @@ def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  return "Hello " + name + "!!"
5
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ iface.launch()
8
+
9
+ def update(name):
10
+ return f"Welcome to Gradio, {name}!"
11
+
12
+ with gr.Blocks() as demo:
13
+ gr.Markdown("Start typing below and then click **Run** to see the output.")
14
+ with gr.Row():
15
+ inp = gr.Textbox(placeholder="What is your name?")
16
+ out = gr.Textbox()
17
+ btn = gr.Button("Run")
18
+ btn.click(fn=update, inputs=inp, outputs=out)
19
+
20
+ demo.launch()