Edit model card

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']]
Downloads last month
222