Spaces:
Running
Running
MarcSkovMadsen
commited on
Commit
•
934b31e
1
Parent(s):
3c2bcb1
update template
Browse files
app.py
CHANGED
@@ -125,7 +125,10 @@ class AsyncComponent(pn.viewable.Viewer):
|
|
125 |
time.sleep(np.random.randint(1, 2))
|
126 |
return 5
|
127 |
|
128 |
-
if
|
129 |
-
pn.extension(
|
130 |
-
|
131 |
-
AsyncComponent()
|
|
|
|
|
|
|
|
125 |
time.sleep(np.random.randint(1, 2))
|
126 |
return 5
|
127 |
|
128 |
+
if pn.state.served:
|
129 |
+
pn.extension()
|
130 |
+
|
131 |
+
component = AsyncComponent()
|
132 |
+
pn.template.FastListTemplate(
|
133 |
+
site="Awesome Panel", title="Async Tasks", main=[component], main_layout=None, main_max_width="400px"
|
134 |
+
).servable()
|