Hey everyone, have a setup where Gradio is hosted behind an nginx route and for some reason the CSS and formatting isn’t coming through. Looks like this:
My relevant nginx config is pretty straight forward:
location /gradio/ {
proxy_pass http://127.0.0.1:7860/ ;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
auth_basic "Restricted Content";
auth_basic_user_file /etc/apache2/.htpasswd;
}
I have access to the port through an SSH tunnel and that is working fine.
Anyone run in to something like this? Thank you
Sorry, it’s an issue we are aware of and we’re working on it!
opened 03:04PM - 15 Mar 23 UTC
bug
### Describe the bug
The UI displays correctly on the local system. But when I … upload it to the server, the UI CSS is not present.
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reproduction
NA
### Screenshot
<img width="1440" alt="Screenshot 2023-03-15 at 12 23 45 AM" src="https://user-images.githubusercontent.com/71621292/225127688-2ce7189c-70f5-44c4-bce7-ee96040967a6.png">
### Logs
```shell
No logs. Only a 404 error.
```
### System Info
```shell
This is hosted on railway.app.
```
### Severity
annoying
I think this is still an issue, or maybe I have a config problem. Chrome’s console is reporting an inability to load theme.css but it is looking at the root and not the subdirectory (/gradio) I have this pointed at.
The page just shows “Loading…” instead of anything else now. I’m running version 3.24.0:
pip3 show gradio
Name: gradio
Version: 3.24.0
Hello, how did you solve this “always show loading …”? Also have this problem with nginx for gradio.
No solution yet - wonder if it’s a config problem. Just upgraded to the latest Gradio package and no go.
@freddyaboulton , any guidance would be super helpful
You can try to use nginx config from official doc . If it does not help -
I can try to help your through upwork proposal.