-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 Interface does not run locally without internet connection #1450
Comments
Hmmm it looks like we are loading certain assets from the web for Gradio 3.0. We should fix that @aliabid94 In the meantime, perhaps you can try using an older version of gradio (say |
thank you very much, my problem has been solved by your advice. |
That's strange. Will take a look. |
Related to fonts: #1224 |
We currently load fonts from the google fonts CDN, the iframe resizer from CDNJS and bokeh from the Bokeh CDN. All of these things will break when offline. We need to copy the source and self host, preferably along with other static assets on the CDN rather than on the server in order to fix these issues (we should be self hosting fonts for performance reasons but font are slightly more complex as the google CDN is quite clever, we need to ensure we only load the smallest subset we can get away with). |
What help is needed with this? Besides fonts, there are several places in the code where contact via https is attempted to
This also breaks when offline, with the exception of |
Another thing to note, analytics are on by default, which don't work with no network. If anyone else is having issues with this, you can add |
Do we know what sort of data is being mined by analytics? |
@abidlabs I want to deploy a chatbot on my local machine without internet connection for many users. However, when I use gradio==2.9.4, it does not contain the class gr.chatbot. When I use 3.24.1, it requires internet connection. Do you have any suggestion on this? I am not familiar with UI. |
Hi @Juenjie unfortunately I do not think it is possible to use |
Happy Bugiversary. Are the plans to resolve this year-old issue? |
#4398 should fix offline for most use cases |
My Gradio app want to load some javascript file from Amazon which it fails on my server (my server and my client don't have access to the internet). What should I do? Url of the file: Is there any way to make this file available offline? |
Update: I've found mutliple places where amazonaws is used (+). gradio/js/_website/src/routes/+layout.svelte Lines 49 to 53 in ff6f525
|
I'm encountering this exact issue in gradio 3.44.4 Is there an earlier 3.x version which supports offline usage? |
Do you have an example app showing this behaviour? The CDN should only be used when embedding gradio apps, for local apps it should be pulling the files from your local file system. |
This is just the Gradio website and doesn't affect the Gradio library. |
This works! My Gradio version is 4.19.2 |
@xinqingguo did you set the env variable os.environ["GRADIO_ANALYTICS_ENABLED"] = "False" |
Same here. the fonts loading from the google fonts and the iframe resizer loading from cloudflare are the blockers. |
This could be good for 5.0 @aliabid94 |
Describe the bug
I am in a offline environment, that can not connect the internet.
I see nothing in my browser when following 'Quick Start' section of the readme.
Run the example script
In the browser (Chrome and Edge tested) I see nothing. There errors in the console logs that say:
https://fonts.googleapis.com/css?family=Source Sans Pro net::ERR_NAME_NOT_RESOLVED
can anyone give me a hlep to slove this problem, thanks very much. I am in a hurry
Is there an existing issue for this?
Reproduction
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
gr.Interface(fn=greet, inputs="text", outputs="text").launch(debug=True)
Screenshot
Logs
System Info
Severity
blocking all usage of gradio
The text was updated successfully, but these errors were encountered: