Welcome
Create a new model
From the website
Hub documentation
Take a first look at the Hub features
Programmatic access
Use the Hub’s Python client library
Getting started with our git
and git-lfs
interface
You can create a repository from the CLI (skip if you created a repo from the website)
pip install huggingface_hub
You already have it if you installed transformers or datasets
huggingface-cli login
Log in using a token from huggingface.co/settings/tokens
Create a model or dataset repo from the CLI if needed
huggingface-cli repo create repo_name --type {model, dataset, space}
Clone your model, dataset or Space locally
Make sure you have git-lfs installed
(https://git-lfs.github.com)
git lfs install
git clone https://huggingface.co/username/repo_name
Then add, commit and push any file you want, including larges files
save files via `.save_pretrained()` or move them here
git add .
git commit -m "commit from $USER"
git push
In most cases, if you're using one of the compatible libraries, your repo will then be accessible from code, through its identifier: username/repo_name文章來源:http://www.zghlxwxcb.cn/news/detail-830077.html
For example for a transformers model, anyone can load it with:文章來源地址http://www.zghlxwxcb.cn/news/detail-830077.html
tokenizer = AutoTokenizer.from_pretrained("username/repo_name") model = AutoModel.from_pretrained("username/repo_name")
到了這里,關(guān)于注冊 Hugging Face 后的官網(wǎng)創(chuàng)建模型的教程的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!