cyberandy commited on
Commit
3734cdf
1 Parent(s): 92aec69
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -261,14 +261,12 @@ with gr.Blocks(theme=theme) as iface:
261
  with gr.Row():
262
  status = gr.Textbox(label="Status", interactive=False)
263
 
264
- def process_url_sync_wrapper(url, depth, pages):
265
- return asyncio.run(process_url(url, depth, pages))
266
-
267
  generate_btn.click(
268
- fn=process_url_sync_wrapper,
269
  inputs=[url_input, depth_input, pages_input],
270
  outputs=[output, status],
271
  )
272
 
273
  if __name__ == "__main__":
274
- iface.launch()
 
261
  with gr.Row():
262
  status = gr.Textbox(label="Status", interactive=False)
263
 
264
+ # Pass the asynchronous function directly
 
 
265
  generate_btn.click(
266
+ fn=process_url,
267
  inputs=[url_input, depth_input, pages_input],
268
  outputs=[output, status],
269
  )
270
 
271
  if __name__ == "__main__":
272
+ iface.launch(asyncio_mode="auto")