Spaces:
Runtime error
Runtime error
acecalisto3
commited on
Commit
•
1e4b6d9
1
Parent(s):
304a527
Update app.py
Browse files
app.py
CHANGED
@@ -282,9 +282,14 @@ with gr.Blocks() as demo:
|
|
282 |
async def update_feed_content():
|
283 |
return generate_rss_feed()
|
284 |
|
285 |
-
#
|
286 |
-
|
287 |
-
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
if __name__ == "__main__":
|
290 |
demo.launch()
|
|
|
282 |
async def update_feed_content():
|
283 |
return generate_rss_feed()
|
284 |
|
285 |
+
# Periodic update loop
|
286 |
+
async def periodic_update():
|
287 |
+
while True:
|
288 |
+
await asyncio.sleep(300) # Wait for 5 minutes
|
289 |
+
await update_feed_content()
|
290 |
+
|
291 |
+
# Start the periodic update task
|
292 |
+
asyncio.create_task(periodic_update())
|
293 |
|
294 |
if __name__ == "__main__":
|
295 |
demo.launch()
|