asofter commited on
Commit
ab27d07
1 Parent(s): e361b51

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ inference: false
5
+ pipeline_tag: token-classification
6
+ tags:
7
+ - ner
8
+ license: mit
9
+ datasets:
10
+ - conll2003
11
+ ---
12
+
13
+ # ONNX version of dbmdz/bert-large-cased-finetuned-conll03-english
14
+
15
+ **This model is a conversion of [dbmdz/bert-large-cased-finetuned-conll03-english](https://huggingface.co/dbmdz/bert-large-cased-finetuned-conll03-english) to ONNX** format using the [🤗 Optimum](https://huggingface.co/docs/optimum/index) library.
16
+
17
+ `dbmdz/bert-large-cased-finetuned-conll03-english` is designed for named-entity recognition (NER), capable of finding person, organization, and other entities in the text.
18
+
19
+ ## Usage
20
+
21
+ Loading the model requires the [🤗 Optimum](https://huggingface.co/docs/optimum/index) library installed.
22
+
23
+ ```python
24
+ from optimum.onnxruntime import ORTModelForTokenClassification
25
+ from transformers import AutoTokenizer, pipeline
26
+
27
+
28
+ tokenizer = AutoTokenizer.from_pretrained("laiyer/bert-large-cased-finetuned-conll03-english-onnx")
29
+ model = ORTModelForTokenClassification.from_pretrained("laiyer/bert-large-cased-finetuned-conll03-english-onnx")
30
+ ner = pipeline(
31
+ task="ner",
32
+ model=model,
33
+ tokenizer=tokenizer,
34
+ )
35
+
36
+ ner_output = ner("My name is John Doe.")
37
+ print(ner_output)
38
+ ```