Closed yjtan0819 closed 4 weeks ago
Update: I successfully integrated the bar_plot_demo
from this GitHub link into a FastAPI path. I achieved this by appending app = gr.mount_gradio_app(app, bar_plot, path="/")
at the end of the script. However, on my AKS server, this setup only functions correctly when I mount the bar plot on the root path /
. If I attempt to mount it on a different path, let's say /test
, I encounter an "Error: No API Found" message.
I have the same error trying to deploy my app with azure auth. Seems like mount_gradio_app
is not behaving as expected.
This issue has been solved by adding a parameter root_path in gr.mount_gradio_app
, which will tell the gradio interface to fetch the required information at the right path.
Describe the bug
I'm working with a FastAPI application that has multiple endpoints. The 'login-demo' endpoint presents a Gradio interface with a Login Button. Once the user clicks the button and logs in via Microsoft Entra ID, I aim to show their name, preferred_username, and roles on a separate Gradio interface at the 'gradio' endpoint. This setup works perfectly on localhost. However, when I deploy this on Azure Kubernetes Service using nginx and a custom path, I encounter an issue. I can fetch the user information, but the 'gradio' endpoint returns an 'Error: NO API Found' and does not display the user information.
https://fastapi.example.com/login-demo is accessed by the nginx proxy to http://0.0.0.0:7000/login-demo for example.
I'm seeking assistance to resolve this issue. Can anyone help please?
Have you searched existing issues? 🔎
Reproduction
Screenshot
Logs
No response
System Info
Severity
Blocking usage of gradio