You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hub/models-adding-libraries.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ If you need help with the integration, feel free to open an [issue](https://gith
17
17
18
18
## Implementation
19
19
20
-
Implementing an integration of a library with the Hub often means providing built-in methods to load models from the Hub and allow users to push new models to the Hub. In this section, we will cover the basics on how to do that using the `huggingface_hub` library. For more in-depth guidance, check out [this guide](https://huggingface.co/docs/huggingface_hub/guides/integrations).
20
+
Implementing an integration of a library with the Hub often means providing built-in methods to load models from the Hub and allow users to push new models to the Hub. This sectionwill cover the basics of how to do that using the `huggingface_hub` library. For more in-depth guidance, check out [this guide](https://huggingface.co/docs/huggingface_hub/guides/integrations).
21
21
22
22
### Installation
23
23
@@ -39,13 +39,13 @@ npm add @huggingface/hub
39
39
40
40
</Tip>
41
41
42
-
Once they have successfully installed the `huggingface_hub` library, users will need to authenticate. The easiest way to authenticate is to save the token on the machine. You can do that from the terminal using the `login()` command:
42
+
Users will need to authenticate once they have successfully installed the `huggingface_hub` library. The easiest way to authenticate is to save the token on the machine. You can do that from the terminal using the `login()` command:
43
43
44
44
```
45
45
huggingface-cli login
46
46
```
47
47
48
-
The command tells if you are already logged in and prompt you for your token. The token is then validated and saved in your `HF_HOME` directory (defaults to `~/.cache/huggingface/token`). Any script or library interacting with the Hub will use this token when sending requests.
48
+
The command tells you if you are already logged in and prompts you for your token. The token is then validated and saved in your `HF_HOME` directory (defaults to `~/.cache/huggingface/token`). Any script or library interacting with the Hub will use this token when sending requests.
49
49
50
50
Alternatively, you can programmatically login using `login()` in a notebook or a script:
51
51
@@ -58,7 +58,7 @@ Authentication is optional when downloading files from public repos on the Hub.
58
58
59
59
### Download files from the Hub
60
60
61
-
Integrations allows users to download a model from the Hub and instantiate it directly from yours library. This is often made possible by providing a method (usually called `from_pretrained` or `load_from_hf`) that has be specific to your library. To instantiate a model from the Hub, your library has to:
61
+
Integrations allow users to download a model from the Hub and instantiate it directly from your library. This is often made possible by providing a method (usually called `from_pretrained` or `load_from_hf`) that has to be specific to your library. To instantiate a model from the Hub, your library has to:
62
62
- download files from the Hub. This is what we will discuss now.
63
63
- instantiate the Python model from these files.
64
64
@@ -142,7 +142,7 @@ If your library allows pushing a model to the Hub, it is recommended to generate
142
142
143
143
## Register your library
144
144
145
-
Well done! You should now have a library able to load a model from the Hub and eventually push new models. The next step is to make sure that your models on the Hub are welldocumented and integrated with the platform. To do so, libraries can be registered on the Hub, which comes with a few benefits for the users:
145
+
Well done! You should now have a library able to load a model from the Hub and eventually push new models. The next step is to make sure that your models on the Hub are well-documented and integrated with the platform. To do so, libraries can be registered on the Hub, which comes with a few benefits for the users:
146
146
- a pretty label can be shown on the model page (e.g. `KerasNLP` instead of `keras-nlp`)
147
147
- a link to your library repository and documentation is added to each model page
0 commit comments