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

[Bug]: 国内ip访问今天巨特么卡 #1103

Open
1 of 2 tasks
hengyanqwe opened this issue Apr 18, 2024 · 2 comments
Open
1 of 2 tasks

[Bug]: 国内ip访问今天巨特么卡 #1103

hengyanqwe opened this issue Apr 18, 2024 · 2 comments

Comments

@hengyanqwe
Copy link

hengyanqwe commented Apr 18, 2024

这个bug是否已存在现有issue了?

  • 我确认没有已有issue,且已阅读常见问题

错误表现

image
image

我f12看了下,有几个cdn特别慢,22秒才加载完成,能不能保存在本地引用?不然用个代理平台还得翻墙=-=。

复现操作

image
image

错误日志

No response

运行环境

  • OS:
  • Browser:
  • Gradio version:
  • Python version:

帮助解决

  • 我愿意协助解决!

补充说明

No response

@hengyanqwe hengyanqwe added the bug Something isn't working label Apr 18, 2024
@Keldos-Li Keldos-Li removed the bug Something isn't working label Apr 18, 2024
@laxfer
Copy link

laxfer commented Apr 21, 2024

可以本地化这几个文件,这个CDN不稳定,时快时慢,fancybox.css这个css放到/ChuanhuChatGPT/web_assets/stylesheet这里,marked.min.js和fancybox.umd.js下载放到/ChuanhuChatGPT/web_assets/javascript放到这里,修改/ChuanhuChatGPT/modules/webui.py中第54行
def reload_javascript():
js = javascript_html()
js += '<script async type="module" src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>'
js += '<script async type="module" src="https://spin.js.org/spin.umd.js"></script>'
js += '<script async src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox/fancybox.umd.js"></script>'
修改为
def reload_javascript():
js = javascript_html()
js += '<script async type="module" src="/file=web_assets/javascript/marked.min.js"></script>'
js += '<script async type="module" src="https://spin.js.org/spin.umd.js"></script>'
js += '<script async src="/file=web_assets/javascript/fancybox.umd.js"></script>'

@famousprince
Copy link

cdn.jsdelivr.net/npm 可以替换为 s4.zstatic.net/npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants