Gorengoz's picture
Update README.md
d12b7a9 verified
|
raw
history blame
1.31 kB
---
license: mit
language:
- tr
---
Bu model https://github.com/stefan-it/turkish-bert'in; aşağıdaki 3 kategorinin olduğu metin sınıflandırma verilerine göre fine-tuned edilmiş halidir.
```
code_to_label={
'LABEL_0': 'olumlu ',
'LABEL_1': 'nötr ',
'LABEL_2': 'olumsuz' }
```
## Eğitim ve validasyon verisi
Fine-tune işlemi için Gorengoz/tr-customerreview veri seti kullanılmıştır.
### Hiperparametreler
model_args = {
"num_train_epochs":3, "overwrite_output_dir":True}
model = ClassificationModel(
'bert',
'dbmdz/bert-base-turkish-128k-cased',
num_labels=3,
args=model_args,
weight=[0.1, 0.25,0.65]
)
## Eğitim Metrikleri
| Epochs | Running Loss |
|--- |--- |
| 1| 0.0092 |
| 2| 0.0087 |
| 3| 0.0054 |
### Nasıl Kullanılacağı
```
from transformers import AutoTokenizer, AutoModelForSequenceClassification
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']]
```