Update app.py
Browse files
app.py
CHANGED
|
@@ -5,14 +5,14 @@ def greet(text):
|
|
| 5 |
print('\n')
|
| 6 |
print(text)
|
| 7 |
print('start sleep')
|
| 8 |
-
time.sleep(
|
| 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, outputs=output_text)
|
| 18 |
|
|
|
|
| 5 |
print('\n')
|
| 6 |
print(text)
|
| 7 |
print('start sleep')
|
| 8 |
+
time.sleep(5)
|
| 9 |
print('end sleep')
|
| 10 |
print(text)
|
| 11 |
return "echo " + text
|
| 12 |
|
| 13 |
with gr.Blocks() as demo:
|
| 14 |
+
input_text = gr.Textbox(label='in')
|
| 15 |
+
output_text = gr.Textbox(label='out')
|
| 16 |
btn = gr.Button("Run")
|
| 17 |
btn.click(fn=greet, inputs=input_text, outputs=output_text)
|
| 18 |
|