Views
No views yet
AutoModelForSequenceClassification (Hugging Face Transformers).| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Non-Toxic (0) | 0.93 | 0.95 | 0.94 |
| Toxic (1) | 0.70 | 0.61 | 0.65 |
| Accuracy | - | - | 0.90 |
| Macro Avg | 0.82 | 0.78 | 0.80 |
| Weighted Avg | 0.90 | 0.90 | 0.90 |
transformers library:1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2from transformers import pipeline
3
4# Load model and tokenizer
5model_name = "giovanaPcarvalho/bertabaporu-toxicity-reddit-ptbr"
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForSequenceClassification.from_pretrained(model_name)
8
9# Create the classification pipeline
10classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
11
12# Test a comment
13text = "O seu post foi a coisa mais ridícula que eu já li hoje."
14result = classifier(text)
15
16print(result)
171@inproceedings{piorino-etal-2026-dialogos,
2 title = "Di{\'a}logos T{\'o}xicos: Gatilhos e Padr{\~o}es de Intera{\c{c}}{\~a}o no {R}eddit Brasileiro",
3 author = "Piorino, Giovana and
4 Machado, Marco Ant{\^o}nio de Alc{\^a}ntara and
5 Lima, Luiz Henrique Quevedo and
6 Pagano, Adriana and
7 Silva, Ana Paula Couto da",
8 editor = "Souza, Marlo and
9 de-Dios-Flores, Iria and
10 Santos, Diana and
11 Freitas, Larissa and
12 Souza, Jackson Wilke da Cruz and
13 Ribeiro, Eug{\'e}nio",
14 booktitle = "Proceedings of the 17th International Conference on Computational Processing of {P}ortuguese ({PROPOR} 2026) - Vol. 1",
15 month = apr,
16 year = "2026",
17 address = "Salvador, Brazil",
18 publisher = "Association for Computational Linguistics",
19 url = "[https://aclanthology.org/2026.propor-1.57/](https://aclanthology.org/2026.propor-1.57/)",
20 pages = "581--590",
21 ISBN = "979-8-89176-387-6"
22}