Views
No views yet
| Cinsiyetçilik | Irkçılık | Kızdırma | Nötr | |
|---|---|---|---|---|
| Precision | 0.925 | 0.878 | 0.824 | 0.915 |
| Recall | 0.831 | 0.896 | 0.843 | 0.935 |
| F1 Score | 0.875 | 0.887 | 0.833 | 0.925 |
| Accuracy : 0.886 |
1from transformers import AutoTokenizer, TextClassificationPipeline, TFBertForSequenceClassification
2
3tokenizer = AutoTokenizer.from_pretrained("nanelimon/bert-base-turkish-bullying")
4model = TFBertForSequenceClassification.from_pretrained("nanelimon/bert-base-turkish-bullying", from_pt=True)
5pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True, top_k=2)
6
7print(pipe('Bu bir denemedir hadi sende dene!'))[[{'label': 'Nötr', 'score': 0.999175488948822}, {'label': 'Cinsiyetçi Zorbalık', 'score': 0.00042115405085496604}]]