Spaces:
Sleeping
Sleeping
Ken Sang Tang commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -136,7 +136,7 @@ async def task_events(task_id: str):
|
|
| 136 |
last_event_time = time.time()
|
| 137 |
|
| 138 |
if event["type"] in ["complete", "error"]:
|
| 139 |
-
|
| 140 |
except asyncio.TimeoutError:
|
| 141 |
# Send heartbeat to keep connection alive
|
| 142 |
yield ": heartbeat\n\n"
|
|
|
|
| 136 |
last_event_time = time.time()
|
| 137 |
|
| 138 |
if event["type"] in ["complete", "error"]:
|
| 139 |
+
break
|
| 140 |
except asyncio.TimeoutError:
|
| 141 |
# Send heartbeat to keep connection alive
|
| 142 |
yield ": heartbeat\n\n"
|