Downloads · 30 days
5
0% of all-time downloads
ennp/bert-turkish-text-classification-cased
bert-turkish-text-classification-cased is a text classification model from ennp. 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.
Bu model https://github.com/stefan-it/turkish-bert'in; aşağıdaki 5 kategorinin olduğu metin sınıflandırma verilerine göre fine-tuned edilmiş halidir.
Downloads · 30 days
5
0% of all-time downloads
All-time downloads
1.7K
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.bin737 MB · 100%
From the Hugging Face model README
Bu model https://github.com/stefan-it/turkish-bert'in; aşağıdaki 5 kategorinin olduğu metin sınıflandırma verilerine göre fine-tuned edilmiş halidir.
code_to_label={
'LABEL_0': 'INSULT ',
'LABEL_1': 'RACIST ',
'LABEL_2': 'SEXIST',
'LABEL_3': 'PROFANITY ',
'LABEL_4': 'OTHER' }
from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer, AutoModelForSequenceClassification
tokenizer= AutoTokenizer.from_pretrained("ennp/bert-turkish-text-classification-cased")
model= AutoModelForSequenceClassification.from_pretrained("ennp/bert-turkish-text-classification-cased")
nlp=pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
code_to_label={
'LABEL_0': 'INSULT ',
'LABEL_1': 'RACIST ',
'LABEL_2': 'SEXIST',
'LABEL_3': 'PROFANITY ',
'LABEL_4': 'OTHER' }
code_to_label[nlp("kıl herif gibi davranma")[0]['label']]