Downloads · 30 days
26
24% of all-time downloads
HenriqueLz/bert-base-portuguese-fakerecogna2-extrativa-elections
bert-base-portuguese-fakerecogna2-extrativa-elections is a text classification model from HenriqueLz. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Este modelo é uma versão fine-tuned do neuralmind/bert-base-portuguese-cased para a tarefa de Detecção de Notícias Falsas (Fake News) em português brasileiro, treinado no dataset HenriqueLz/fakerecogna2-extrativa-elec…
Downloads · 30 days
26
24% of all-time downloads
All-time downloads
107
Public
Parameters
109M
436 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
Este modelo é uma versão fine-tuned do neuralmind/bert-base-portuguese-cased para a tarefa de Detecção de Notícias Falsas (Fake News) em português brasileiro, treinado no dataset HenriqueLz/fakerecogna2-extrativa-elections.
0.9889| ID | Label | Descrição |
|---|---|---|
0 | VERDADEIRA | Notícia factual / verdadeira |
1 | FALSA | Notícia falsa / desinformação |
pipeline:from transformers import pipeline
classifier = pipeline(
"text-classification",
model="HenriqueLz/bert-base-portuguese-fakerecogna2-extrativa-elections",
tokenizer="HenriqueLz/bert-base-portuguese-fakerecogna2-extrativa-elections",
)
texto = "Ministério da Saúde divulga calendário oficial de vacinação para o próximo ano."
resultado = classifier(texto)
print(resultado)
# Output: [{'label': 'VERDADEIRA', 'score': 0.99...}]
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("HenriqueLz/bert-base-portuguese-fakerecogna2-extrativa-elections")
model = AutoModelForSequenceClassification.from_pretrained("HenriqueLz/bert-base-portuguese-fakerecogna2-extrativa-elections")
texto = "Texto da notícia para classificação..."
inputs = tokenizer(texto, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
label = model.config.id2label[predicted_class_id]
print(f"Classe predita: {label}")
HenriqueLz/fakerecogna2-extrativa-elections (split temporal com data de corte em 30/10/2021).1e-5 com otimizador AdamW e decaimento de peso (weight decay) de 0.01.DataCollatorWithPadding).Caso utilize este modelo em sua pesquisa, cite o dataset base FakeRecogna 2.0 e o artigo original da arquitetura correspondente:
@inproceedings{garcia-etal-2024-text,
title = "Text Summarization and Temporal Learning Models Applied to {P}ortuguese Fake News Detection in a Novel {B}razilian Corpus Dataset",
author = "Garcia, Gabriel Lino and Paiola, Pedro Henrique and Jodas, Danilo Samuel and Sugi, Luis Afonso and Papa, Jo{\~a}o Paulo",
booktitle = "Proceedings of the 16th International Conference on Computational Processing of Portuguese - Vol. 1",
month = mar,
year = "2024",
address = "Santiago de Compostela, Galicia/Spain",
publisher = "Association for Computational Lingustics",
url = "https://aclanthology.org/2024.propor-1.9/",
pages = "86--96"
}
@inproceedings{souza2020bertimbau,
author = {Souza, F{'a}bio and Nogueira, Rodrigo and Lotufo, Roberto},
title = {{BERT}imbau: Pretrained {BERT} Models for {B}razilian {P}ortuguese},
booktitle = {9th Brazilian Conference on Intelligent Systems (BRACIS)},
year = {2020},
pages = {403--417},
doi = {10.1007/978-3-030-61377-8_28},
url = {https://link.springer.com/chapter/10.1007/978-3-030-61377-8_28}
}