Downloads · 30 days
4
1% of all-time downloads
MartinoMensio/racism-models-raw-label-epoch-2
racism-models-raw-label-epoch-2 is a text classification model from MartinoMensio. 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.
This model is a fine-tuned version of BETO (spanish bert) that has been trained on the Datathon Against Racism dataset (2022)
Downloads · 30 days
4
1% of all-time downloads
All-time downloads
579
Public
Repo size
879 MB
Likes
0
Public
Click a slice to open those files.
.bin439 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of BETO (spanish bert) that has been trained on the Datathon Against Racism dataset (2022)
We performed several experiments that will be described in the upcoming paper "Estimating Ground Truth in a Low-labelled Data Regime:A Study of Racism Detection in Spanish" (NEATClasS 2022) We applied 6 different methods ground-truth estimations, and for each one we performed 4 epochs of fine-tuning. The result is made of 24 models:
This model is raw-label-epoch-2
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_name = 'raw-label-epoch-2'
tokenizer = AutoTokenizer.from_pretrained("dccuchile/bert-base-spanish-wwm-uncased")
full_model_path = f'MartinoMensio/racism-models-{model_name}'
model = AutoModelForSequenceClassification.from_pretrained(full_model_path)
pipe = pipeline("text-classification", model = model, tokenizer = tokenizer)
texts = [
'y porqué es lo que hay que hacer con los menas y con los adultos también!!!! NO a los inmigrantes ilegales!!!!',
'Es que los judíos controlan el mundo'
]
print(pipe(texts))
# [{'label': 'racist', 'score': 0.8982619643211365}, {'label': 'non-racist', 'score': 0.6703745126724243}]
For more details, see https://github.com/preyero/neatclass22