镜像:dsw-registry-vpc.cn-shanghai.cr.aliyuncs.com/pai/modelscope:1.10.0-pytorch2.1.0tensorflow2.14.0-gpu-py310-cu118-ubuntu22.04
源码:https://github.com/THUDM/ChatGLM3
我也遇到了同样的问题,版本如下
gradio==4.14.0
gradio_client==0.8.0
查看错误日志发现其实这个版本的gradio已经提供了解决方案,但是由于在DSW里无法访问gradio的服务器导致一个程序安装失败,share的url没有生成成功,需要手动安装gradio提供的frpc,可以看一下错提示
我这里报错是这样
Could not create share link. Missing file: /opt/conda/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:
这个问题可能是由于Gradio部署时没有正确配置访问权限导致的。你可以尝试以下方法解决这个问题:
确保你的模型已经成功部署到DSW上,并且可以通过URL访问。例如:http://your_dsw_server/your_model_name
在Gradio部署时,确保你已经设置了正确的访问权限。你可以使用gradio.launch()
函数的share
参数来控制访问权限。例如:
import gradio as gr
def your_function(input):
# Your model inference code here
pass
iface = gr.Interface(fn=your_function, inputs="text", outputs="text")
iface.launch(share=True) # 设置访问权限为公开
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352