ahjvdjf33 commited on
Commit
9594ca6
·
verified ·
1 Parent(s): 273a5a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -5,7 +5,12 @@ def greet(text):
5
  print('start sleep')
6
  time.sleep(20)
7
  print('end sleep')
8
- return " Echo " + text
9
 
10
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
11
- iface.launch()
 
 
 
 
 
 
5
  print('start sleep')
6
  time.sleep(20)
7
  print('end sleep')
8
+ print(text)
9
 
10
+ with gr.Blocks() as demo:
11
+ input_text = gr.Textbox()
12
+ output_text = gr.Textbox()
13
+ btn = gr.Button("Run")
14
+ btn.click(fn=greet, inputs=input_text)
15
+
16
+ demo.launch()