radames commited on
Commit
cd57287
1 Parent(s): 629ecb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -5,6 +5,11 @@ def greet(name):
5
  return "Hello " + name + "!"
6
 
7
 
8
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
9
-
10
- demo.launch()
 
 
 
 
 
 
5
  return "Hello " + name + "!"
6
 
7
 
8
+ with gr.Blocks() as blocks:
9
+ with gr.Row():
10
+ text_in = gr.Text()
11
+ text_out = gr.Text()
12
+ btn = gr.Button("Run")
13
+ btn.click(fn=greet, inputs=text_in, outputs=text_out)
14
+
15
+ blocks.launch()