Giter VIP home page Giter VIP logo

Comments (13)

pngwn avatar pngwn commented on May 30, 2024

Ooooh

from gradio.

abidlabs avatar abidlabs commented on May 30, 2024

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.

kingsznhone avatar kingsznhone commented on May 30, 2024

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.

bf96163 avatar bf96163 commented on May 30, 2024

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.

1390806607 avatar 1390806607 commented on May 30, 2024

@bf96163 Hello, have you solved it yet

from gradio.

bars0um avatar bars0um commented on May 30, 2024

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.

abidlabs avatar abidlabs commented on May 30, 2024

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.

abidlabs avatar abidlabs commented on May 30, 2024

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 avatar bf96163 commented on May 30, 2024

@bf96163 Hello, have you solved it yet

no

from gradio.

bf96163 avatar bf96163 commented on May 30, 2024

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.

bars0um avatar bars0um commented on May 30, 2024

@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.

bf96163 avatar bf96163 commented on May 30, 2024

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.

abidlabs avatar abidlabs commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.