Views
No views yet
1from transformers import pipeline
2text = "senden nefret ediyorum"
3model_id = "saribasmetehan/bert-base-turkish-sentiment-analysis"
4classifer = pipeline("text-classification",model = model_id)
5preds= classifer(text)
6print(preds)
7
8#[{'label': 'LABEL_2', 'score': 0.7510055303573608}]1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
3tokenizer = AutoTokenizer.from_pretrained("saribasmetehan/bert-base-turkish-sentiment-analysis")
4model = AutoModelForSequenceClassification.from_pretrained("saribasmetehan/bert-base-turkish-sentiment-analysis")| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.1902 | 1.0 | 625 | 0.1629 | 0.9575 |
| 0.1064 | 2.0 | 1250 | 0.1790 | 0.96 |
| 0.0631 | 3.0 | 1875 | 0.2358 | 0.96 |
| 0.0146 | 4.0 | 2500 | 0.2458 | 0.962 |