Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,15 +64,19 @@ def my_function(x, progress=gr.Progress()):
|
|
| 64 |
time.sleep(0.1)
|
| 65 |
return x
|
| 66 |
|
|
|
|
|
|
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
gr.
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
)
|
|
|
|
|
|
|
| 77 |
|
| 78 |
demo.queue().launch()
|
|
|
|
| 64 |
time.sleep(0.1)
|
| 65 |
return x
|
| 66 |
|
| 67 |
+
|
| 68 |
+
with gr.Blocks() as demo:
|
| 69 |
|
| 70 |
+
with gr.Row():
|
| 71 |
+
input = gr.Textbox()
|
| 72 |
+
output = gr.Textbox()
|
| 73 |
+
btn = gr.Button(value="Submit")
|
| 74 |
+
btn.click(my_function, inputs=input, outputs=output)
|
| 75 |
+
|
| 76 |
+
#demo = gr.Interface(
|
| 77 |
+
# my_function,
|
| 78 |
+
# gr.Textbox(),
|
| 79 |
+
# gr.Textbox(),
|
| 80 |
+
#)
|
| 81 |
|
| 82 |
demo.queue().launch()
|