Update README.md
Browse files
README.md
CHANGED
@@ -58,7 +58,19 @@ Este modelo ajustado puede usarse para anotar autom谩ticamente nuevos textos en
|
|
58 |
|
59 |
## How to Use
|
60 |
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
## Training data
|
64 |
|
|
|
58 |
|
59 |
## How to Use
|
60 |
|
61 |
+
```
|
62 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
63 |
+
|
64 |
+
tokenizer = AutoTokenizer.from_pretrained("JoshuaAAX/beto-finetuned-ner")
|
65 |
+
model = AutoModelForTokenClassification.from_pretrained("JoshuaAAX/beto-finetuned-ner")
|
66 |
+
|
67 |
+
|
68 |
+
text = "La Federaci贸n nacional de cafeteros de Colombia es una entidad del estado. El primer presidente el Dr Augusto Guerra cont贸 con el aval de la Asociaci贸n Colombiana de Aviaci贸n."
|
69 |
+
|
70 |
+
|
71 |
+
ner_pipeline= pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="max")
|
72 |
+
ner_pipeline(text)
|
73 |
+
```
|
74 |
|
75 |
## Training data
|
76 |
|