Views
No views yet
code_to_label={
'LABEL_0': 'olumlu ',
'LABEL_1': 'nötr ',
'LABEL_2': 'olumsuz' }
| Epochs | Running Loss |
|---|---|
| 1 | 0.0092 |
| 2 | 0.0087 |
| 3 | 0.0054 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification,pipeline
tokenizer = AutoTokenizer.from_pretrained("Gorengoz/bert-turkish-sentiment-analysis-cased")
model = AutoModelForSequenceClassification.from_pretrained("Gorengoz/bert-turkish-sentiment-analysis-cased")
nlp=pipeline("text-classification", model=model, tokenizer=tokenizer)
code_to_label={
'LABEL_0': 'olumlu ',
'LABEL_1': 'nötr ',
'LABEL_2': 'olumsuz' }
code_to_label[nlp("Ürün berbat, paranıza yazık olur.")[0]['label']]