Comments (13)
Ooooh
from gradio.
Interesting, what's the URL in which your Gradio app is running?
Can you describe more how your Gradio app is deployed? Is it behind an nginx proxy?
from gradio.
Interesting, what's the URL in which your Gradio app is running?
Can you describe more how your Gradio app is deployed? Is it behind an nginx proxy?
it is running on a gpu rential platform, local port is 6006,reverse proxy by platform to outside 8443
I guess it's something like nginx .
from gradio.
I also find the path /login redirected to wrong address i run my gradio in port 7001 i want to proxy it to 8001/img2txt here is my nginx.conf (the server listen to 80 is to fix the problem theme.css redirect to 80 problem) `events {
}
http{
server {
listen 8001;
server_name _;
location /assets/ {
rewrite ^/assets/(.*)$ /img2txt/assets/$1 break;
proxy_pass http://127.0.0.1:7001/img2txt/;
}
location /img2txt/ {
proxy_pass http://127.0.0.1:7001/img2txt/;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name _;
location /img2txt/{
proxy_pass http://127.0.0.1:7001/img2txt/;
}
}
}` after added server listen to 80 the theme.css loaded correctly ,but after i click login button(yes i use password of gradio) i got another error this is the url i submit :”http://192.168.8.122/img2txt/login“ but it should call ”http://192.168.8.122:8000/img2txt/login“ mybe they are the same bug(like theme.css load error in nginx)
from gradio.
@bf96163 Hello, have you solved it yet
from gradio.
Have the same issue...in developer tools console I see attempts to load theme.css from localhost instead of localhost:8181 which is where the app is serving from
from gradio.
Hi @bars0um I'm looking into this issue, can you please describe how your app is deployed as well? Is it behind a proxy?
from gradio.
Can you all please try changing:
proxy_set_header Host $host;
to
proxy_set_header Host $http_host;
in your nginx configuration?
from gradio.
@bf96163 Hello, have you solved it yet
no
from gradio.
Can you all please try changing:
proxy_set_header Host $host;
to
proxy_set_header Host $http_host;
in your nginx configuration?
OK i tried i change all my work to the "/" path not the img2txt path ,and the problem still there :
In mycase ,the theme.css goes to wrong url as before (should goes to http://192.168.8.122:8001/theme.css but it goes to http://192.168.8.122/theme.css) and heart beat goes to the wrong url as before (should go to http://192.168.8.122:8001/heartbeat/vyum226pkk but it goes to http://192.168.8.122/heartbeat/vyum226pkk) and
http://192.168.8.122:8001/assets/index-CZPZ-bmc.css this file status is " 404 Not Found" (as before)
these configs are used this time:
# events block configuration
}
http{
server {
listen 8001;
server_name _;}
location /assets/ {
rewrite ^/assets/(.*)$ /img2txt/assets/$1 break;
proxy_pass http://127.0.0.1:7001/;
}
location /img2txt/ {
proxy_pass http://127.0.0.1:7001/;
# rewrite ^/img2txt/(.*) /$1 break;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
} ```
from gradio.
@abidlabs @bf96163 Yes I see the same on my setup. I've had to forward both 80 and 8081 to the container to work but this is of course not very convenient because I may need to host something else at port 80...
from gradio.
Can you all please try changing:
proxy_set_header Host $host;
to
proxy_set_header Host $http_host;
in your nginx configuration?
I suspect that some hard-coding or incorrectly configured items in the svelte framework caused the auto-generated link points to port 80
from gradio.
I believe that this issue may have been fixed now. Can y'all please try installing gradio
from main
like this:
pip install https://gradio-builds.s3.amazonaws.com/94a1143686733c7fe16e204764b9a3e7240ccf02/gradio-4.31.5-py3-none-any.whl
and check to see if the app is working?
from gradio.
Related Issues (20)
- How to support carriage return sending in the textbox component
- How to support carriage return sending in the textbox component
- Status of CVE-2023-41626? / Security contact e-mail not working? HOT 7
- How to access local image and css files in gradio.HTML HOT 4
- How can I manually change the value of a control? HOT 4
- support websockets 12.0 HOT 1
- Text color of gr.Examples is invisible with gr.themes.Monochrome HOT 3
- Gradio State objects hang the Gradio App HOT 4
- "UserWarning: LoginButton created outside of a Blocks context." is always shown HOT 4
- How to custom footer of gradio app? HOT 2
- RuntimeError: Response content shorter than Content-Length HOT 2
- blocks close will raise error HOT 1
- Gradio Lite: iterative output loads and shows everything at once
- Add delete or remove event to `gr.File` HOT 2
- `HighlightedText` can not show text without inline category label HOT 1
- Feature Request: Client loading a Space that requires user login as an API
- Feature request: features to enable custom preprocessing functions in Examples component HOT 1
- When the gradio_client is used to call the API, the uploaded image will always be renamed image.webp HOT 5
- JSON component incorrectly handling dicts/strings with 'path' key HOT 2
- Long-running tasks require open connection, looking for polling solution HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.