Gradio无法生成外部链接Could not create share link

一般来讲有两种情况,第一种是文件缺失问题,第二种是权限问题

1.缺失文件

报错如下

Could not create share link. Missing file: /root/miniconda3/envs/textgen/lib/python3.11/site-packages/gradio/frpc_linux_amd64_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_linux_amd64
2. Rename the downloaded file to: frpc_linux_amd64_v0.2
3. Move the file to this location: /root/miniconda3/envs/textgen/lib/python3.11/site-packages/gradio

只需要按照提示的步骤1)下载文件2)重命名3)移动文件到指定位置即可

wget https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
mv frpc_linux_amd64 frpc_linux_amd64_v0.2
mv frpc_linux_amd64_v0.2 /root/miniconda3/envs/fa/lib/python3.8/site-packages/gradio
#注意这里改成你自己的路径
2.缺少权限

当按照第一步解决文件缺失问题之后如果依然出现报错

warnings.warn(
Running on local URL:  http://127.0.0.1:7860

Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.

这时候大概率是权限问题,只需给该文件增加可执行权限即可:

cd /root/miniconda3/envs/fa/lib/python3.8/site-packages/gradio 
#注意这里替换成你自己的路径
chmod +x frpc_linux_amd64_v0.2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值