Closed pg56714 closed 1 month ago
Hi @pg56714 - I think the problem is that clicking the examples updates the input image but you have a change event on the input image that clears the outputs.
https://huggingface.co/spaces/pg56714/Segment-Anything-Arena/blob/main/app.py#L202
I think you need to use .clear
event, not a change
event.
Will close as this is behaving as expected.
After further inspection, the issue was that gr.Examples was bound to fn, causing automatic execution when clicking on examples. It was resolved after removing that binding. Thank you.
Describe the bug
After clicking on the examples, click again to directly display the results without needing to click 'submit'.
I tried the same approach and found that others using Gradio on HuggingFace also have this issue where results are produced without needing to click submit. Three cases have been attached to the Google folder linked below.
According to this question, Connection errored out will appear when pressing submit to execute.
This issue does not occur locally.
huggingface discuss
Have you searched existing issues? 🔎
Reproduction
my huggingface space
Screenshot
Three Cases
Logs
No response
System Info
Severity
Blocking usage of gradio