Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection errored out #8393

Closed
1 task done
pg56714 opened this issue May 28, 2024 · 2 comments
Closed
1 task done

Connection errored out #8393

pg56714 opened this issue May 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@pg56714
Copy link

pg56714 commented May 28, 2024

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? 🔎

  • I have searched and found no existing issues

Reproduction

my huggingface space

Screenshot

Three Cases

Logs

No response

System Info

The latest version(2024/05/28) 4.31.5

Severity

Blocking usage of gradio

@pg56714 pg56714 added the bug Something isn't working label May 28, 2024
@pg56714 pg56714 changed the title Connection errored out or new bug Connection errored out and new bug May 28, 2024
@freddyaboulton
Copy link
Collaborator

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.

@pg56714
Copy link
Author

pg56714 commented May 31, 2024

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.

@pg56714 pg56714 changed the title Connection errored out and new bug Connection errored out May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants