Update app.py
Browse files
app.py
CHANGED
|
@@ -8,11 +8,12 @@ def greet(text):
|
|
| 8 |
time.sleep(20)
|
| 9 |
print('end sleep')
|
| 10 |
print(text)
|
|
|
|
| 11 |
|
| 12 |
with gr.Blocks() as demo:
|
| 13 |
input_text = gr.Textbox()
|
| 14 |
-
|
| 15 |
btn = gr.Button("Run")
|
| 16 |
-
btn.click(fn=greet, inputs=input_text)
|
| 17 |
|
| 18 |
demo.launch()
|
|
|
|
| 8 |
time.sleep(20)
|
| 9 |
print('end sleep')
|
| 10 |
print(text)
|
| 11 |
+
return "echo " + text
|
| 12 |
|
| 13 |
with gr.Blocks() as demo:
|
| 14 |
input_text = gr.Textbox()
|
| 15 |
+
output_text = gr.Textbox()
|
| 16 |
btn = gr.Button("Run")
|
| 17 |
+
btn.click(fn=greet, inputs=input_text, output_text)
|
| 18 |
|
| 19 |
demo.launch()
|