小白心血来潮,想用一下gradio,并使用demo.launch(share = True)运行生成公网地址遇到以下三个问题:
一.没有frpc_darwin_arm64_v0.2,can not create share link
给出错误提示:
Could not create share link. Missing file: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/gradio/frpc_darwin_arm64_v0.2.
Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:
1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_darwin_arm64
2. Rename the downloaded file to: frpc_darwin_arm64_v0.2
3. Move the file to this location: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/gradio
解决方案:
根据提示下载完rpc_darwin_arm64,修改名称
运行指令移动到指定位置,sudo mv 文件所在目录/frpc_darwin_arm64_v0.2 /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/gradio
二、frpc不生效
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
解决方案:应该是权限问题参考了以下文章。
运行了以下指令,应该是解决了:
sudo chmod +x 自己目录/gradio/frpc_linux_amd64_v0.2
三、又有新问题,login to server failed: EOF
[service.go:132] login to server failed: EOF
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
解决方案:
可能是公司网络端口问题,具体不太清楚。
换自己热点,可以了,生成了share link