acecalisto3 commited on
Commit
c97adcc
·
verified ·
1 Parent(s): 75e1f41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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
- # Launch the RSS feed update task
214
- asyncio.create_task(periodic_rss_update())
 
 
 
 
215
 
216
  if __name__ == "__main__":
217
- demo.launch()
 
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())