开发者社区 > ModelScope模型即服务 > 计算机视觉 > 正文

联网使用问题

你好: 我将该代码下载到了本地,并进行了调试,表明可以使用,但是断网了之后就不能用了,python中的modelscope库必须联网才能使用吗? 报错如下: Traceback (most recent call last): File "E:\Pytorch_code\modelscope-ocr-text-spotting\OCR_Plugin.py", line 207, in widget = ImageOCR() File "E:\Pytorch_code\modelscope-ocr-text-spotting\OCR_Plugin.py", line 33, in init self.ocr_detection = pipeline(Tasks.ocr_detection, model='damo/cv_resnet18_ocr-detection-line-level_damo') File "D:\software\python3.10\lib\site-packages\modelscope\pipelines\builder.py", line 100, in pipeline model = normalize_model_input(model, model_revision) File "D:\software\python3.10\lib\site-packages\modelscope\pipelines\builder.py", line 25, in normalize_model_input if isinstance(model, str) and is_official_hub_path(model, model_revision): File "D:\software\python3.10\lib\site-packages\modelscope\pipelines\util.py", line 41, in is_official_hub_path return is_official_hub_impl(path) File "D:\software\python3.10\lib\site-packages\modelscope\pipelines\util.py", line 38, in is_official_hub_impl raise ValueError(f'invalid model repo path {e}')

ValueError: invalid model repo path HTTPConnectionPool(host='www.modelscope.cn', port=80): Max retries exceeded with url: /api/v1/models/damo/cv_resnet18_ocr-detection-line-level_damo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001B77880F760>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

展开
收起
游客id5y2dbwjaxkc 2023-04-27 17:25:11 2678 0
1 条回答
写回答
取消 提交回答
  • 可以离线使用哈,请查阅文档

    https://modelscope.cn/docs/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#Q5%EF%BC%9AModelScope%20%E6%A8%A1%E5%9E%8B%E7%9A%84%E4%BD%BF%E7%94%A8%E4%BE%9D%E8%B5%96%E4%BA%8E%E4%BA%92%E8%81%94%E7%BD%91%E8%BF%9E%E6%8E%A5%E5%90%97%EF%BC%9F%3Cbr%3E

    2023-05-10 16:15:03
    赞同 展开评论 打赏

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载