Skip to content

Call mounted gradio app via api#4435

Merged
abidlabs merged 2 commits into
mainfrom
4340-call-monuted-app-via-api
Jun 6, 2023
Merged

Call mounted gradio app via api#4435
abidlabs merged 2 commits into
mainfrom
4340-call-monuted-app-via-api

Conversation

@freddyaboulton

Copy link
Copy Markdown
Contributor

Description

Closes: #4340

The problem is that the urls in utils.py are absolute so urllib will not construct the path we expect

image

Fix is to make the urls relative and to make sure the src ends with /

Added a unit test for this case and all unit tests are passing locally

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

A note about the CHANGELOG

Hello 👋 and thank you for contributing to Gradio!

All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.

Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile) in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)".

If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections.
If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the
GitHub web UI since that lets you upload files directly via drag-and-drop.

@gradio-pr-bot

Copy link
Copy Markdown
Collaborator

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-4435-all-demos

@freddyaboulton freddyaboulton marked this pull request as ready for review June 6, 2023 14:32
@freddyaboulton freddyaboulton requested a review from abidlabs June 6, 2023 14:32
@abidlabs

abidlabs commented Jun 6, 2023

Copy link
Copy Markdown
Member

Works beautifully @freddyaboulton!

@abidlabs abidlabs merged commit bc6a1fa into main Jun 6, 2023
@abidlabs abidlabs deleted the 4340-call-monuted-app-via-api branch June 6, 2023 15:40
@pngwn pngwn mentioned this pull request Jul 26, 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.

Blocks .queue when mounted on FastAPI timeouts

3 participants