Is there a way to cancel a running process if it is taking too long to complete? Iโve looked at the cancels for a button.click()
. Which is being discussed here Is there a way to kill a function in mid proccess? - Gradio - Hugging Face Forums But I donโt seem to be able to get it to work.
My button click event looks like the following:
send_chat = txt.submit(update_human_message, [chatbot, txt, memory], [chatbot, txt, memory])
btn.click(fn=None, inputs=None, outputs=None, cancels=[send_chat], queue=False)
#calling the gradio app
demo.queue(concurrency_count=2, max_size=20).launch()
Could someone please guide me?