Instructions to use auhide/bert-bg-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use auhide/bert-bg-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="auhide/bert-bg-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("auhide/bert-bg-ner") model = AutoModelForTokenClassification.from_pretrained("auhide/bert-bg-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -123,5 +123,7 @@ print("NERs:", predict(text, model=model, tokenizer=tokenizer))
|
|
| 123 |
```
|
| 124 |
```sh
|
| 125 |
Input: Барух Спиноза е роден в Амстердам .
|
| 126 |
-
NERs: [{'word': 'Барух Спиноза', '
|
| 127 |
-
```
|
|
|
|
|
|
|
|
|
| 123 |
```
|
| 124 |
```sh
|
| 125 |
Input: Барух Спиноза е роден в Амстердам .
|
| 126 |
+
NERs: [{'word': 'Барух Спиноза', 'entity_group': 'PER'}, {'word': 'Амстердам', 'entity_group': 'LOC'}]
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
Note: There are three types of entities - `PER`, `ORG`, `LOC`.
|