Update README.md
Browse files
README.md
CHANGED
|
@@ -29,7 +29,7 @@ This model is developed to tag Names, Organisations and addresses. I have used a
|
|
| 29 |
|
| 30 |
### Direct Use
|
| 31 |
|
| 32 |
-
|
| 33 |
from transformers import BertTokenizer, AutoModelForTokenClassification
|
| 34 |
from transformers import pipeline
|
| 35 |
tokenizer = BertTokenizer.from_pretrained('bert-base-cased')
|
|
@@ -38,7 +38,7 @@ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
|
| 38 |
example = "While Maria was representing Johnson & Associates at a conference in Spain, she mailed me a letter from her new office at 123 Elm St., Apt. 4B, Springfield, IL.",
|
| 39 |
|
| 40 |
print(nlp(example))
|
| 41 |
-
|
| 42 |
|
| 43 |
|
| 44 |
|
|
|
|
| 29 |
|
| 30 |
### Direct Use
|
| 31 |
|
| 32 |
+
```python
|
| 33 |
from transformers import BertTokenizer, AutoModelForTokenClassification
|
| 34 |
from transformers import pipeline
|
| 35 |
tokenizer = BertTokenizer.from_pretrained('bert-base-cased')
|
|
|
|
| 38 |
example = "While Maria was representing Johnson & Associates at a conference in Spain, she mailed me a letter from her new office at 123 Elm St., Apt. 4B, Springfield, IL.",
|
| 39 |
|
| 40 |
print(nlp(example))
|
| 41 |
+
```
|
| 42 |
|
| 43 |
|
| 44 |
|