登录 HuggingFace 账户
首先需要去官网申请一个 Access Tokenhttps://huggingface.co/settings/tokens申请的 token 为然后在需要登陆 hugginface 的虚拟环境中使用命令3.1.1 登录一个账户(lerobot-env) root93162817432b:~# hf auth login _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_| _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_| To log in, huggingface_hub requires a token generated from https://huggingface.co/settings/tokens . Enter your token (input will not be visible):(这里复制申请好的 Access Token) Add token as git credential? [y/N]: y Token is valid (permission: fineGrained). The token token has been saved to /root/.cache/huggingface/stored_tokens Cannot authenticate through git-credential as no helper is defined on your machine. You might have to re-authenticate when pushing to the Hugging Face Hub. Run the following command in your terminal in case you want to set the store credential helper as default. git config --global credential.helper store Read https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage for more details. Token has not been saved to git credential helper. Your token has been saved to /root/.cache/huggingface/token Login successful. The current active token is: token最后输出 Your token has been saved to /root/.cache/huggingface/token 和 Login successful. 就说明登录成功了报错如果一直没反应即输出如下(lerobot-env) root93162817432b:~# hf auth login _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_| _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_| To log in, huggingface_hub requires a token generated from https://huggingface.co/settings/tokens . Enter your token (input will not be visible): Add token as git credential? [y/N]: y 等待中... 等待中... 等待中... 等待中... 2000 years later... 还是等待中...说明网络连不上在终端输入export HF_ENDPOINThttps://hf-mirror.com即可 Login successful.--------------------------------------------------------------3.1.2 列出已登录的账户(lerobot-env) root93162817432b:~# hf auth list name | token ---------|--------------- * token | hf_****yamW3.1.3 切换用户(lerobot-env) root93162817432b:~# hf auth switch Available stored tokens: 1. token Enter the number of the token to switch to (or q to quit):注意这里我只登录了一个用户所以只列出了1. token登陆多个才可以切换用户3.1.4 查看已登录的用户(lerobot-env) root93162817432b:~# hf auth whoami user: xiaoarong Authenticated through private endpoint: https://hf-mirror.com3.1.5 注销登录hf auth logout # 效果不展示了知道命令即可
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2554004.html
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!