Spaces:
Running
Running
update
Browse files
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 |
-
|
265 |
-
return asyncio.run(process_url(url, depth, pages))
|
266 |
-
|
267 |
generate_btn.click(
|
268 |
-
fn=
|
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")
|