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

Fix gr.load() so that it works with the SSE v1 protocol #6810

Merged
merged 6 commits into from
Dec 15, 2023
Merged

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Dec 15, 2023

Stupidly simple fix 🥲

Fixes: #5927

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 15, 2023

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/40f68f9464d880c07e458c2cb865402828edaab5/gradio-4.9.1-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@40f68f9464d880c07e458c2cb865402828edaab5#subdirectory=client/python"

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 15, 2023

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Fix gr.load() so that it works with the SSE v1 protocol

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

helper = None
if endpoint.protocol in ("ws", "sse"):
helper = client.new_helper(fn_index)
helper = client.new_helper(fn_index)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I had added "sse_v1" to the list but actually I don't think there's any reason to have this check because gr.load() only works with gradio==4.x which includes the protocol anymore

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense

@abidlabs abidlabs changed the title Fix for gr.load() Fix gr.load() so that it works with the SSE v1 protocol Dec 15, 2023
@abidlabs abidlabs marked this pull request as ready for review December 15, 2023 20:32
Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @abidlabs !

@abidlabs
Copy link
Member Author

Thanks @freddyaboulton for the quick review!

@abidlabs abidlabs merged commit 526fb6c into main Dec 15, 2023
13 checks passed
@abidlabs abidlabs deleted the load-fix branch December 15, 2023 20:35
@pngwn pngwn mentioned this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gr.load() failing with Error
3 participants