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
Remaining bug from #7317 - file path resolution wrong #7724
Comments
Thanks @skye0402 that's super weird but I'll look into it. Can you share a quick code snippet sharing how you're supplying the images to the chatbot so that I can repro the same on my end? |
I'm having a bit of a hard time reproducing this. Here's the code I tried: import gradio as gr
with gr.Blocks() as demo:
gr.Chatbot([
("abc", ("panda.jpg", )),
])
demo.launch(root_path="/8044") Running behind a proxy here just fine: http://35.85.61.147/8044/ Let me know if you can share any more details that could help us repro! |
I ran into the same issue. The host name is somehow truncated.
Can you try to run the service behind a reverse proxy with a host name? |
Just a code snippet - if this doesn't help I need to build a separate simple setup to show:
|
Running into this issue on Azure cloud (container instances). The output images get served with a corrupted url on the Azure domain of container instances (...azurecontainer.io --> ...azurec). Gradio container is running on localhost serving to a Caddy reverse-proxy, learn more about this config here. You can check out the instance here: https://tl-clipdemo.westeurope.azurecontainer.io/ Try searching for "A tiger walking", we are testing CPU based searching on CLIP embeddings. Results will take about 25 seconds. The output urls are truncated on the domain name (hostname), for example:
Should be:
Thanks for looking into this! |
Please try this with a hostname, not an IP address. |
Hi @liangjs @skye0402 @rwb-truelime I just added some logging to Gradio -- if you install this version of Gradio, it should print some stuff to your terminal. Would you be able to please install and let me know what is printed to your terminal?
|
I don't know why it prints nothing in my log, but with this patch the image url works fine for me. |
Ok good to hear, we'll get the PR in soon! |
Thanks! 🚀 |
Describe the bug
With the correction of bug #7317 it's possible again from release 4.21.0 to work behind an application router. That's great. I recently discovered that the file path for pictures in a chatbot interface (at least that, maybe others as well) is not correct. Can you fix it?
Running local:
No issues. As you can see the path looks correct.
Running behind approuter:
The issue is the URL.
Used in the first reference:
https://apachat.c-290ae5b.kyma.shoot.live.k8s-hana./file=/tmp/gradio/8002ab707d333733cb66b8e9241218143955df1d/20220922063344.jpeg
Used in the second reference:
https://apachat.c-290ae5b.kyma.shoot.live.k8s-hana.o/file=/tmp/gradio/8002ab707d333733cb66b8e9241218143955df1d/20220922063344.jpeg
Correct:
https://apachat.c-290ae5b.kyma.shoot.live.k8s-hana.ondemand.com/file=/tmp/gradio/8002ab707d333733cb66b8e9241218143955df1d/20220922063344.jpeg
Somehow the last 2 parts of the domain name are cut off. Interesting is that the first is cut after the dot while the second shows the "o" of "ondemand". Can you check that please?
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: