Skip to content
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

gradio 4.37.1 the address of theme.css and upload imgae is not right #8654

Closed
1 task done
lilyzlt opened this issue Jun 28, 2024 · 2 comments
Closed
1 task done

gradio 4.37.1 the address of theme.css and upload imgae is not right #8654

lilyzlt opened this issue Jun 28, 2024 · 2 comments
Labels
bug Something isn't working pending clarification

Comments

@lilyzlt
Copy link

lilyzlt commented Jun 28, 2024

Describe the bug

I changed my nginx conf (follow #7659 and #7391 ) and gradio version update to 4.37.1, still not working, need help!!

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
import cv2
import argparse

parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--port', metavar='port', type=int, nargs=1, help='port', required=True)

args = parser.parse_args()
print(args)


def to_black(image):
    output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    return output

interface = gr.Interface(fn=to_black, inputs="image", outputs="image", examples=[["test.png"]])
interface.launch(server_name='0.0.0.0', share=False, server_port=args.port[0])

Screenshot

image
image

Logs

No response

System Info

Gradio version:
gradio                            4.37.1
gradio_client                     1.0.2

nginx conf:
    location / {
        set $ups1 "127.0.0.1:8080";
        rewrite_by_lua '
        local obj = require("getups")
        obj.getups()
        ';

        proxy_next_upstream off;
        proxy_pass http://$ups1;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header host $ups1;
        proxy_set_header origin http://$ups1;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }

Severity

I can work around it

@lilyzlt lilyzlt added the bug Something isn't working label Jun 28, 2024
@abidlabs
Copy link
Member

Hi @lilyzlt can you try this: #8129 (comment)

@lilyzlt
Copy link
Author

lilyzlt commented Jun 28, 2024

Hi @lilyzlt can you try this: #8129 (comment)

works!! thanks so much !

@lilyzlt lilyzlt closed this as completed Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending clarification
Projects
None yet
Development

No branches or pull requests

2 participants