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
|
@@ -13,6 +13,14 @@ metrics:
|
|
| 13 |
Fine-tuned on a Bulgarian subset of [wikiann](https://huggingface.co/datasets/wikiann).
|
| 14 |
|
| 15 |
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
Firstly, you'll have to define these methods, since we are using a subword Tokenizer:
|
| 17 |
```python
|
| 18 |
def predict(
|
|
|
|
| 13 |
Fine-tuned on a Bulgarian subset of [wikiann](https://huggingface.co/datasets/wikiann).
|
| 14 |
|
| 15 |
## Usage
|
| 16 |
+
Import the libraries:
|
| 17 |
+
```python
|
| 18 |
+
from typing import List
|
| 19 |
+
|
| 20 |
+
import torch
|
| 21 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
Firstly, you'll have to define these methods, since we are using a subword Tokenizer:
|
| 25 |
```python
|
| 26 |
def predict(
|