--- license: mit language: - tr metrics: - accuracy pipeline_tag: text-classification --- language: - tr tags: - text-classification - emotion - pytorch datasets: - emotion metrics: - Accuracy, F1 Score --- # bert-base-turkish-cased-emotion ## Model description: [bert-base-turkish-cased](https://huggingface.co/dbmdz/bert-base-turkish-cased) finetuned on Turkish film comments shared in beyazperde.com with the help of BERTurk pretrained language model using PyTorch and Huggingface Transformers library. ``` learning rate 2e-5, batch size 32, num_train_epochs=5, optimizer=AdamW ``` ## Model Performance precision recall f1-score support 0 0.93 0.93 0.93 1333 1 0.93 0.93 0.93 1333 accuracy 0.93 2666 macro avg 0.93 0.93 0.93 2666 weighted avg 0.93 0.93 0.93 2666 ## How to Use the model: ```python from transformers import pipeline classifier = pipeline("text-classification", model='zafercavdar/distilbert-base-turkish-cased-emotion', return_all_scores=True) prediction = classifier("Bu kütüphaneyi seviyorum, en iyi yanı kolay kullanımı.", ) print(prediction) """ Output: [ [ {'label': 'sadness', 'score': 0.0026786490343511105}, {'label': 'joy', 'score': 0.6600754261016846}, {'label': 'love', 'score': 0.3203163146972656}, {'label': 'anger', 'score': 0.004358913749456406}, {'label': 'fear', 'score': 0.002354539930820465}, {'label': 'surprise', 'score': 0.010216088965535164} ] ] """ ``` ## Dataset: [Beyazoerde.com reviews](https://huggingface.co/datasets/sinanyuksel/beyazperde).