Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ global_lock = get_global_lock()
|
|
13 |
|
14 |
# Add a button to start the task
|
15 |
if st.button('Start long running task'):
|
16 |
-
with
|
17 |
-
with
|
18 |
st.write("Task started")
|
19 |
long_running_task()
|
20 |
-
st.write("Task completed")
|
|
|
13 |
|
14 |
# Add a button to start the task
|
15 |
if st.button('Start long running task'):
|
16 |
+
with global_lock:
|
17 |
+
with st.spinner("Running long running task"):
|
18 |
st.write("Task started")
|
19 |
long_running_task()
|
20 |
+
st.write("Task completed")
|