|
--- |
|
library_name: transformers |
|
license: apache-2.0 |
|
language: |
|
- ru |
|
metrics: |
|
- f1 |
|
- accuracy |
|
base_model: ai-forever/ruRoberta-large |
|
--- |
|
|
|
# Model Card for Model ID |
|
|
|
<!-- Provide a quick summary of what the model is/does. --> |
|
|
|
|
|
## Model Details |
|
|
|
### Model Description |
|
|
|
- **Language(s) (NLP):** Russian |
|
- **License:** apache-2.0 |
|
- **Finetuned from model:** ai-forever/ruRoberta-large |
|
|
|
|
|
## Usage |
|
|
|
```python |
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
|
|
model = AutoModelForSequenceClassification.from_pretrained("pasukka/auto-parts-term-classifier-v.3") |
|
tokenizer = AutoTokenizer.from_pretrained('ai-forever/ruRoberta-large') |
|
|
|
term = 'фильтр топливный' |
|
outputs = model.forward(**tokenizer(term, return_tensors='pt').to(device='cuda')) |
|
id = outputs.logits.argmax(dim=1)[0].item() |
|
|
|
print(model.config.id2label[id]) |
|
``` |
|
Result: |
|
``` |
|
фильтр |
|
``` |
|
|
|
#### Metrics |
|
|
|
<!-- These are the evaluation metrics being used, ideally with a description of why. --> |
|
|
|
|
|
![image/png](/static-proxy?url=https%3A%2F%2Fcdn-uploads.huggingface.co%2Fproduction%2Fuploads%2F65e7f892239d815cc6141c97%2F2-diiwBOz06OvgJy3UuYQ.png%3C%2Fspan%3E)%3C!-- HTML_TAG_END --> |
|
|
|
|