Spaces:
Runtime error
Runtime error
acecalisto3
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -210,8 +210,12 @@ with gr.Blocks() as demo:
|
|
210 |
feed_content.update(value=updated_feed)
|
211 |
await asyncio.sleep(300) # Wait for 300 seconds before updating again
|
212 |
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
215 |
|
216 |
if __name__ == "__main__":
|
217 |
-
|
|
|
210 |
feed_content.update(value=updated_feed)
|
211 |
await asyncio.sleep(300) # Wait for 300 seconds before updating again
|
212 |
|
213 |
+
async def main():
|
214 |
+
# Launch the periodic RSS update task and the Gradio app together
|
215 |
+
await asyncio.gather(
|
216 |
+
periodic_rss_update(),
|
217 |
+
demo.launch(share=True)
|
218 |
+
)
|
219 |
|
220 |
if __name__ == "__main__":
|
221 |
+
asyncio.run(main())
|