Downloads · 30 days
17
0% of all-time downloads
rmihaylov/roberta-base-sentiment-bg
roberta-base-sentiment-bg is a text classification model from rmihaylov. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
17
0% of all-time downloads
All-time downloads
21.5K
Public
Repo size
893 MB
Likes
6
Public
Click a slice to open those files.
.bin446 MB · 98%
From the Hugging Face model README
This is a Multilingual Roberta model.
This model is cased: it does make a difference between bulgarian and Bulgarian.
Here is how to use this model in PyTorch:
>>> import torch
>>> from transformers import AutoModel, AutoTokenizer
>>>
>>> model_id = "rmihaylov/roberta-base-sentiment-bg"
>>> model = AutoModel.from_pretrained(model_id, trust_remote_code=True)
>>> tokenizer = AutoTokenizer.from_pretrained(model_id)
>>>
>>> inputs = tokenizer.batch_encode_plus(['Това е умно.', 'Това е тъпо.'], return_tensors='pt')
>>> outputs = model(**inputs)
>>> torch.softmax(outputs, dim=1).tolist()
[[0.0004746630438603461, 0.9995253086090088],
[0.9986956715583801, 0.0013043134240433574]]