emanuelaboros commited on
Commit
d10abc7
1 Parent(s): 14808d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -9
README.md CHANGED
@@ -47,17 +47,10 @@ Overview of corpus statistics. %noisy gives the percentage of agency mentions wi
47
  You can use this model with Transformers *pipeline* for NER.
48
 
49
  ```python
50
- from transformers import AutoTokenizer, AutoModelForTokenClassification
51
  from transformers import pipeline
52
 
53
- tokenizer = AutoTokenizer.from_pretrained("impresso-project/bert-newsagency-ner-fr")
54
- model = AutoModelForTokenClassification.from_pretrained("impresso-project/bert-newsagency-ner-fr")
55
-
56
- nlp = pipeline("newsagency-ner", model=model, tokenizer=tokenizer, trust_remote_code=True)
57
- example = "Mon nom est François et j'habite à Paris. (AFP)"
58
-
59
- ner_results = nlp(example)
60
- print(ner_results)
61
  ```
62
 
63
  ### BibTeX entry and citation info
 
47
  You can use this model with Transformers *pipeline* for NER.
48
 
49
  ```python
 
50
  from transformers import pipeline
51
 
52
+ nlp = pipeline("newsagency-ner", model="impresso-project/bert-newsagency-ner-fr", trust_remote_code=True)
53
+ nlp("Mon nom est François et j'habite à Paris. (Reuter)")
 
 
 
 
 
 
54
  ```
55
 
56
  ### BibTeX entry and citation info