Skip to content

Commit

Permalink
Update README.md (huggingface#8820)
Browse files Browse the repository at this point in the history
  • Loading branch information
moniquebm authored Dec 11, 2020
1 parent 649d389 commit b161f1a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions model_cards/monilouise/ner_pt_br/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ For more details, please see, (https://github.com/SecexSaudeTCU/noticias_ner).

#### How to use

```python
from transformers import BertForTokenClassification, DistilBertTokenizerFast, pipeline
model = BertForTokenClassification.from_pretrained('monilouise/ner_pt_br')
tokenizer = DistilBertTokenizerFast.from_pretrained('neuralmind/bert-base-portuguese-cased'
, model_max_length=512
, do_lower_case=False
)
nlp = pipeline('ner', model=model, tokenizer=tokenizer, grouped_entities=True)
result = nlp("O Tribunal de Contas da União é localizado em Brasília e foi fundado por Rui Barbosa.")
```

#### Limitations and bias

- The finetunned model was trained on a corpus with around 180 news articles crawled from Google News. The original project's purpose was to recognize named entities in news
Expand Down

0 comments on commit b161f1a

Please sign in to comment.