-
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
root_path
of launch does not work as expected
#4352
Comments
Hi @RussellLuo there's some confusion here. The It looks like what you want is to mount your Gradio application, within another FastAPI, see: https://gradio.app/sharing-your-app/#mounting-within-another-fastapi-app |
@abidlabs Thanks for your reply! I have managed to serve my Gradio application by using the strategy you mentioned above. However, it seemed that everything worked out well even if no Furthermore, launch has lots of parameters, is it possible to adjust the behavior of Gradio application like |
I have the same error. I am trying to mount a gadio app as described, something like https://example.com/myapp using nginx reverse proxy. I get that error when I use root_path="/myapp" in the block.launch call. the response from the server is {"detail":"Not Found"}. I have no problem if I mount the app to the root. @abidlabs does root_path conflict with any other argument or requires other arguments to be set in a certain way ? Even running on the local server port does not work once I add root_path in the launch call. |
Hi @ahmedelgammal I don't see enough details for us to be able to debug, but (a) are you using the latest version of gradio and (b) have you taken a look at this guide here: https://www.gradio.app/guides/running-gradio-on-your-web-server-with-nginx |
@abidlabs yes, I implemented that exactly, except that I am using blocks. This works as expected without the root_path. Once I add the root_path, the app doesn't work, even on the local server. |
Describe the bug
Per the docs of launch:
Related comments from a previous issue: #4291 (comment).
Is there an existing issue for this?
Reproduction
Given the following code:
Run the demo:
Then access the demo from http://127.0.0.1:7861/myapp.
Screenshot
Logs
System Info
Severity
annoying
The text was updated successfully, but these errors were encountered: