Update README.md
Browse files
README.md
CHANGED
|
@@ -181,12 +181,21 @@ sparse_rep = expander.expand(
|
|
| 181 |
## 8. With HuggingFace
|
| 182 |
|
| 183 |
**NOTEBOOK user? Login first**
|
|
|
|
| 184 |
```
|
| 185 |
!huggingface-cli login
|
| 186 |
```
|
| 187 |
|
| 188 |
**Integrating in your code ?**
|
| 189 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
|
| 191 |
```python
|
| 192 |
import torch
|
|
|
|
| 181 |
## 8. With HuggingFace
|
| 182 |
|
| 183 |
**NOTEBOOK user? Login first**
|
| 184 |
+
|
| 185 |
```
|
| 186 |
!huggingface-cli login
|
| 187 |
```
|
| 188 |
|
| 189 |
**Integrating in your code ?**
|
| 190 |
+
[How to use HF tokens in code](https://huggingface.co/docs/hub/en/security-tokens)
|
| 191 |
+
Make these changes
|
| 192 |
+
|
| 193 |
+
```
|
| 194 |
+
tokenizer = AutoTokenizer.from_pretrained('prithivida/Splade_PP_en_v1', token=<Your token>)
|
| 195 |
+
model = AutoModelForMaskedLM.from_pretrained('prithivida/Splade_PP_en_v1', token=<Your token>)
|
| 196 |
+
```
|
| 197 |
+
|
| 198 |
+
**Full code**
|
| 199 |
|
| 200 |
```python
|
| 201 |
import torch
|