Update usage to work with latest `transformers`
Browse files
README.md
CHANGED
@@ -21,7 +21,7 @@ model_name = "QCRI/bert-base-multilingual-cased-pos-english"
|
|
21 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
22 |
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
23 |
|
24 |
-
pipeline = TokenClassificationPipeline(model, tokenizer)
|
25 |
outputs = pipeline("A test example")
|
26 |
print(outputs)
|
27 |
```
|
|
|
21 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
22 |
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
23 |
|
24 |
+
pipeline = TokenClassificationPipeline(model=model, tokenizer=tokenizer)
|
25 |
outputs = pipeline("A test example")
|
26 |
print(outputs)
|
27 |
```
|