asahi417 commited on
Commit
52f9e2b
1 Parent(s): c00c618

model update

Browse files
Files changed (1) hide show
  1. README.md +3 -9
README.md CHANGED
@@ -82,14 +82,7 @@ Full evaluation can be found at [metric file of NER](https://huggingface.co/tner
82
  and [metric file of entity span](https://huggingface.co/tner/bertweet-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/bertweet-large-wnut2017")
89
- model = AutoModelForTokenClassification.from_pretrained("tner/bertweet-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
  ```
@@ -97,8 +90,9 @@ and activate model as below.
97
  ```python
98
  from tner import TransformersNER
99
  model = TransformersNER("tner/bertweet-large-wnut2017")
100
- model.predict("Jacob Collier is a Grammy awarded English artist from London".split(" "))
101
  ```
 
102
 
103
  ### Training hyperparameters
104
 
 
82
  and [metric file of entity span](https://huggingface.co/tner/bertweet-large-wnut2017/raw/main/eval/metric_span.json).
83
 
84
  ### Usage
85
+ This model can be used through the [tner library](https://github.com/asahi417/tner). Install the library via pip
 
 
 
 
 
 
 
86
  ```shell
87
  pip install tner
88
  ```
 
90
  ```python
91
  from tner import TransformersNER
92
  model = TransformersNER("tner/bertweet-large-wnut2017")
93
+ model.predict(["Jacob Collier is a Grammy awarded English artist from London"])
94
  ```
95
+ It can be used via transformers library but it is not recommended as CRF layer is not supported at the moment.
96
 
97
  ### Training hyperparameters
98