Downloads · 30 days
6
33% of all-time downloads
ariannap22/roberta_finetuned_multilabel_unions
roberta_finetuned_multilabel_unions is a machine learning model from ariannap22. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a multi-label classifier fine-tuned on U.S. labor union Facebook posts. It predicts the following communication frames:
Downloads · 30 days
6
33% of all-time downloads
All-time downloads
18
Public
Parameters
125M
501 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors501 MB · 100%
From the Hugging Face model README
This model is a multi-label classifier fine-tuned on U.S. labor union Facebook posts. It predicts the following communication frames:
The model was trained to automatically label union posts according to these categories, supporting research on social media discourse around labor unions. The predicted outcome is a list of 6 binary labels of the kind [0, 0, 1, 0, 0, 0]. Each binary label correspond to a discourse frame in the order presented above.
More details can be found in the paper "Framing Unionization on Facebook: Communication around Representation Elections in the United States".
from simpletransformers.classification import MultiLabelClassificationModel
import torch
import pandas as pd
def main():
cuda_available = torch.cuda.is_available()
model_args = {
"process_count": 1, # disables multiprocessing
}
model = MultiLabelClassificationModel(
"roberta",
"ariannap22/roberta_finetuned_multilabel_unions",
args=model_args,
use_cuda=cuda_available
)
# Example inference
texts = [
"We successfully won the contract vote!",
"Join us for the upcoming rally to support labor rights."
]
predictions, raw_outputs = model.predict(texts)
print(predictions)
if __name__ == "__main__":
main()