Update README.md
Browse files
README.md
CHANGED
|
@@ -15,7 +15,10 @@ git lfs install
|
|
| 15 |
git clone https://huggingface.co/Pky/uie-base
|
| 16 |
```
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
#### 2. load this model from local
|
| 21 |
|
|
@@ -24,7 +27,7 @@ import os
|
|
| 24 |
import torch
|
| 25 |
from transformers import AutoTokenizer
|
| 26 |
|
| 27 |
-
uie_model = 'uie-base'
|
| 28 |
model = torch.load(os.path.join(uie_model, 'pytorch_model.bin')) # load UIE model
|
| 29 |
tokenizer = AutoTokenizer.from_pretrained('uie-base') # load tokenizer
|
| 30 |
...
|
|
|
|
| 15 |
git clone https://huggingface.co/Pky/uie-base
|
| 16 |
```
|
| 17 |
|
| 18 |
+
If you don't have [`git-lfs`], you can also:
|
| 19 |
+
|
| 20 |
+
* Download manually by click [`Files and versions`] at Top Of This Card.
|
| 21 |
+
* Use code to download files, here is my [code example](https://github.com/HarderThenHarder/transformers_tasks/blob/063b9f4bd7c9efc1e851a2506a2dc9d082faec45/UIE/train.py#L99).
|
| 22 |
|
| 23 |
#### 2. load this model from local
|
| 24 |
|
|
|
|
| 27 |
import torch
|
| 28 |
from transformers import AutoTokenizer
|
| 29 |
|
| 30 |
+
uie_model = 'uie-base-zh'
|
| 31 |
model = torch.load(os.path.join(uie_model, 'pytorch_model.bin')) # load UIE model
|
| 32 |
tokenizer = AutoTokenizer.from_pretrained('uie-base') # load tokenizer
|
| 33 |
...
|