python调用huggingface的相关模型报错Could not download ‘pyannote/speaker-diarization‘ pipeline 解决方法

代码信息:

Could not download 'pyannote/speaker-diarization' pipeline.
It might be because the pipeline is private or gated so make
sure to authenticate. Visit https://hf.co/settings/tokens to
create your access token and retry with:

   >>> Pipeline.from_pretrained('pyannote/speaker-diarization',
   ...                          use_auth_token=YOUR_AUTH_TOKEN)

If this still does not work, it might be because the pipeline is gated:
visit https://hf.co/pyannote/speaker-diarization to accept the user conditions.

解决办法:
1.访问huggingface上的模型页面,接受使用条款,例如:
在这里插入图片描述
登录后提交一下信息即可。

2.获取token,将获取到的token放到代码中去
在这里插入图片描述
在这里插入图片描述

问题解决。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
调用huggingface类型的模型,可以使用Huggingface-Transformers库。首先,需要安装并导入Huggingface-Transformers库。然后,使用AutoTokenizer.from_pretrained函数加载所需模型的tokenizer,使用AutoModel.from_pretrained函数加载对应的模型。其中,"MODEL_NAME"是指模型的名称,可以根据需求选择不同的模型。具体模型的名称列表可以在Huggingface模型页面上找到。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [tensorflow2调用huggingface transformer预训练模型](https://blog.csdn.net/weixin_43880190/article/details/117817001)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [中文预训练ALBERT模型.zip](https://download.csdn.net/download/baidu_38876334/87975282)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [python调用huggingface相关模型报错Could not downloadpyannote/speaker-diarizationpipeline 解决...](https://blog.csdn.net/shanchuan2012/article/details/131767747)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值