Downloads · 30 days
12
10% of all-time downloads
erythropygia/distilbert-turkish-comment-analysis
distilbert-turkish-comment-analysis is a text classification model from erythropygia. Use it when you need a label for a piece of text.
This model performs comment categories detect on <bTurkish texts</b. It gives sevent outputs:
Downloads · 30 days
12
10% of all-time downloads
All-time downloads
120
Public
Parameters
68.1M
545 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin272 MB · 50%
From the Hugging Face model README
This model performs comment categories detect on <b>Turkish texts</b>. It gives sevent outputs:
from transformers import AutoConfig, AutoModelForSequenceClassification, AutoTokenizer
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
config = AutoConfig.from_pretrained("erythropygia/distilbert-turkish-comment-analysis")
tokenizer = AutoTokenizer.from_pretrained("erythropygia/distilbert-turkish-comment-analysis", config=config)
model = AutoModelForSequenceClassification.from_pretrained("erythropygia/distilbert-turkish-comment-analysis", config=config)
text = "Bu mağazanın ürünleri çok kötü sakın buradan almayın"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
_, predicted = torch.max(outputs.logits, dim=1)
predicted_label = config.id2label[predicted.item()]
print(predicted_label)
#store_comment