-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
support gradio apps on spaces served on subpaths #9814
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/abe2acb6c0383de922f73be38280737268b11408/gradio-5.3.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@abe2acb6c0383de922f73be38280737268b11408#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/abe2acb6c0383de922f73be38280737268b11408/gradio-client-1.7.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/abe2acb6c0383de922f73be38280737268b11408/dist/lite.js""></script> |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
if (host.endsWith("hf.space")) { | ||
return { | ||
ws_protocol: "wss", | ||
host: host, | ||
http_protocol: protocol as "http:" | "https:" | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why didnt we need this?
@@ -486,6 +486,18 @@ describe("process_endpoint", () => { | |||
expect(response.space_id).toBe("hmb-hello-world"); | |||
expect(response.host).toBe("hmb-hello-world.hf.space"); | |||
}); | |||
|
|||
it("handles huggingface subpath urls", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change looks good! thanks @pngwn!
Description
It is possible to be using a subpath URL even when hosting on spaces which the client doesn't currently take into account. I have tweaked the client to support this.
This is what was breaking our demo space.