asahi417 commited on
Commit
d9f4933
1 Parent(s): b7381b1

model update

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -81,6 +81,24 @@ For F1 scores, the confidence interval is obtained by bootstrap as below:
81
  Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/deberta-v3-large-wnut2017/raw/main/eval/metric.json)
82
  and [metric file of entity span](https://huggingface.co/tner/deberta-v3-large-wnut2017/raw/main/eval/metric_span.json).
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  ### Training hyperparameters
86
 
 
81
  Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/deberta-v3-large-wnut2017/raw/main/eval/metric.json)
82
  and [metric file of entity span](https://huggingface.co/tner/deberta-v3-large-wnut2017/raw/main/eval/metric_span.json).
83
 
84
+ ### Usage
85
+ This model can be used through the transformers library by
86
+ ```python
87
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
88
+ tokenizer = AutoTokenizer.from_pretrained("tner/deberta-v3-large-wnut2017")
89
+ model = AutoModelForTokenClassification.from_pretrained("tner/deberta-v3-large-wnut2017")
90
+ ```
91
+ but, since transformers do not support CRF layer, it is recommended to use the model via `T-NER` library.
92
+ Install the library via pip
93
+ ```shell
94
+ pip install tner
95
+ ```
96
+ and activate model as below.
97
+ ```
98
+ from tner import TransformersNER
99
+ model = TransformersNER("tner/deberta-v3-large-wnut2017")
100
+ model.predict("Jacob Collier is a Grammy awarded English artist from London".split(" "))
101
+ ```
102
 
103
  ### Training hyperparameters
104