办理方案:
找到你存放llamafactory的路径下的/LLaMA-Factory/src/llamafactory/webui/interface.py文件,修改run_web_ui()下的 gradio_share = True 使gradio天生公共链接
这里大概会遇到报错如下:
Could not create share link. Missing file: /mnt/user/.local/lib/python3.10/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: /mnt/user/.local/lib/python3.10/site-packages/gradio
按照它的提示下载链接里的文件,改名成frpc_linux_amd64_v0.2,然后mv去它提示的地址就好
但是大概还会遇到报错如下:
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
这里需要cd 进刚刚的位置 然后输入命令
chmod +x frpc_linux_amd64_v0.2
给予权限