Update README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ Run the following:
|
|
| 16 |
|
| 17 |
```python
|
| 18 |
import torch
|
| 19 |
-
from transformers import
|
| 20 |
import math
|
| 21 |
|
| 22 |
model_path = "tim1900/bert-chunker-3"
|
|
@@ -28,11 +28,6 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
| 28 |
trust_remote_code=True,
|
| 29 |
)
|
| 30 |
|
| 31 |
-
config = AutoConfig.from_pretrained(
|
| 32 |
-
model_path,
|
| 33 |
-
trust_remote_code=True,
|
| 34 |
-
)
|
| 35 |
-
|
| 36 |
device = "cpu" # or 'cuda'
|
| 37 |
|
| 38 |
model = BertForTokenClassification.from_pretrained(
|
|
|
|
| 16 |
|
| 17 |
```python
|
| 18 |
import torch
|
| 19 |
+
from transformers import AutoTokenizer, BertForTokenClassification
|
| 20 |
import math
|
| 21 |
|
| 22 |
model_path = "tim1900/bert-chunker-3"
|
|
|
|
| 28 |
trust_remote_code=True,
|
| 29 |
)
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
device = "cpu" # or 'cuda'
|
| 32 |
|
| 33 |
model = BertForTokenClassification.from_pretrained(
|