Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,19 +79,21 @@ with gr.Blocks() as demo:
|
|
| 79 |
outputs=outputs,
|
| 80 |
title=title,
|
| 81 |
description=description,
|
| 82 |
-
)
|
| 83 |
-
|
| 84 |
-
gr.
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
|
|
|
|
|
|
| 90 |
|
| 91 |
-
demo.launch(share=
|
| 92 |
|
| 93 |
-
def greet(name):
|
| 94 |
-
|
| 95 |
#
|
| 96 |
#
|
| 97 |
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 79 |
outputs=outputs,
|
| 80 |
title=title,
|
| 81 |
description=description,
|
| 82 |
+
).render()
|
| 83 |
+
|
| 84 |
+
with gr.Row(visible=False):
|
| 85 |
+
out = gr.Textbox()
|
| 86 |
+
btn = gr.Button()
|
| 87 |
+
btn.click(fn=keep_alive,
|
| 88 |
+
inputs=[],
|
| 89 |
+
outputs="text",
|
| 90 |
+
api_name="keep_alive"
|
| 91 |
+
)
|
| 92 |
|
| 93 |
+
demo.launch(share=False)
|
| 94 |
|
| 95 |
+
# def greet(name):
|
| 96 |
+
# return "Hello " + name + "!!"
|
| 97 |
#
|
| 98 |
#
|
| 99 |
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|