gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Index.js issues?

Open Data-drone opened this issue 2 years ago • 10 comments

Describe the bug

My Gradio app that worked 12 hours ago now seems to have issues when loading. No errors server side.

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

Versions pinned:

pip install fastapi==0.95.2 gradio==3.20.1

app:


from fastapi import FastAPI
from fastapi.responses import RedirectResponse
import gradio as gr

fastapi_app = FastAPI()
gradio_app = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")

@fastapi_app.get("/")
def redirect_to_gradio():
    return RedirectResponse(url="/gradio")

app = gr.mount_gradio_app(fastapi_app, gradio_app, path='/gradio')

trigger:

uvicorn basic_app:app --host 0.0.0.0 --port 7777

12 hrs ish ago, everything loaded fine in browser. Now I get: image

Screenshot

image

Logs

python shows no errors just browser

System Info

gradio = 3.20.1
os = Ubuntu 22.04.2 LTS
browser = chrome Version 114.0.5735.110 (Official Build) (64-bit)

Severity

blocking all usage of gradio

Data-drone avatar Jun 09 '23 05:06 Data-drone

Hi @Data-drone can you please check with the latest version of gradio?

abidlabs avatar Jun 09 '23 16:06 abidlabs

With the latest version I get this: https://github.com/gradio-app/gradio/issues/3472

Data-drone avatar Jun 10 '23 02:06 Data-drone

Hi @Data-drone is this still an issue with the latest version of gradio? We've fixed #3472

abidlabs avatar Oct 02 '23 21:10 abidlabs

image

I am getting this with gradio-3.47.1

Data-drone avatar Oct 07 '23 11:10 Data-drone

Really weird @Data-drone . I can't reproduce locally. Maybe something changed with cloud.databricks.com?

freddyaboulton avatar Oct 10 '23 18:10 freddyaboulton

I'll see if I can find out more info. Are you able to point into what I should be looking at? I am not a web dev

Data-drone avatar Oct 11 '23 10:10 Data-drone

Can you also try to pin gradio_client to 0.0.1?

EDIT: Only if you are using version 3.20.1! If you are on 3.47.1 please use 0.6.0.

freddyaboulton avatar Oct 11 '23 14:10 freddyaboulton

I investigated some more and pinning gradio_client didn't work

Data-drone avatar Nov 08 '23 11:11 Data-drone

Hi @Data-drone sorry I know this is an old issue, but if you are still facing this problem, can you please check if the latest version of gradio (4.21) still has this issue? We made some fixes to how Gradio works behind proxies which may have solved this issue

abidlabs avatar Mar 09 '24 00:03 abidlabs

Okay will try to find the time

Data-drone avatar Mar 09 '24 00:03 Data-drone

Thanks @Data-drone! I'm going to close this for now since I believe this issue is solved, but can reopen if needed.

abidlabs avatar Mar 13 '24 18:03 abidlabs

Hi @abidlabs I finally managed to try and I am using this app command:

import gradio as gr

CUSTOM_PATH = "/driver-proxy/o/4953176047938121/0327-132800-5tl1wbti/"

io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")

if __name__ == '__main__':

    io.launch(root_path=CUSTOM_PATH)

I have set GRADIO_SERVER_NAME and GRADIO_SERVER_PORT as well.

The app is being started with; !python3 my_app.py

It looks like it is still looking for index.css under the raw server uri rather than adding the root_path to that as well

Data-drone avatar Mar 30 '24 05:03 Data-drone

I just tried with GRADIO_ROOT_PATH set and with the full uri ie http://blahblahblah/CUSTOM_PATH and that seems to work but still getting an errow with assets unlike before the buttons are rendering though

image

Data-drone avatar Mar 30 '24 05:03 Data-drone

I think that error can be ignored if the page loads correctly. Note to @pngwn and @abidlabs though

freddyaboulton avatar Apr 01 '24 14:04 freddyaboulton