File size: 926 Bytes
dfe40cb fb81fa8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
---
language: en
tags:
- ner
- pytorch
license: mit
---
# CNN for Named Entity Recognition
This model is a CNN-based model for Named Entity Recognition (NER) built on top of a pre-trained transformer model.
## Model description
The model uses a pre-trained transformer as a base and adds convolutional layers on top for NER tasks.
## Intended uses & limitations
This model is intended for Named Entity Recognition tasks. It should be used on Yoruba text data.
## Usage
To use this model:
```python
from transformers import AutoTokenizer
from custom_modeling import get_model
tokenizer = AutoTokenizer.from_pretrained("your-username/your-model-name")
model = get_model("your-username/your-model-name")
# Load the saved weights
import torch
model.load_state_dict(torch.load("pytorch_model.bin"))
# Use the model for inference
inputs = tokenizer("Your text here", return_tensors="pt")
outputs = model(**inputs)
```
|