temp timeout function
Browse files
app.py
CHANGED
@@ -106,6 +106,20 @@ iface_constructor_info = gr.Interface(
|
|
106 |
description="Get background information about a specific constructor"
|
107 |
)
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
# Create your markdown-only tab using Blocks
|
111 |
with gr.Blocks() as markdown_tab:
|
|
|
106 |
description="Get background information about a specific constructor"
|
107 |
)
|
108 |
|
109 |
+
def timeout_test(seconds: int):
|
110 |
+
time.sleep(seconds)
|
111 |
+
return f"Timeout for {seconds} seconds completed"
|
112 |
+
|
113 |
+
iface_timeout_testing = gr.Interface(
|
114 |
+
fn=timeout_test,
|
115 |
+
inputs=[
|
116 |
+
gr.Number(label="Seconds", value=5, minimum=1, maximum=60)
|
117 |
+
],
|
118 |
+
outputs="text",
|
119 |
+
title="Timeout Testing",
|
120 |
+
description="Test the timeout functionality"
|
121 |
+
)
|
122 |
+
|
123 |
|
124 |
# Create your markdown-only tab using Blocks
|
125 |
with gr.Blocks() as markdown_tab:
|