m-newhauser/senator-tweets
Viewer β’ Updated β’ 99.7k β’ 126 β’ 6
How to use m-newhauser/distilbert-political-tweets with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="m-newhauser/distilbert-political-tweets") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("m-newhauser/distilbert-political-tweets")
model = AutoModelForSequenceClassification.from_pretrained("m-newhauser/distilbert-political-tweets")This model is a fine-tuned version of distilbert-base-uncased on the m-newhauser/senator-tweets dataset, which contains all tweets made by United States senators during the first year of the Biden Administration. It achieves the following results on the evaluation set:
The goal of this model is to classify short pieces of text as having either Democratic or Republican sentiment. The model was fine-tuned on 99,693 tweets (51.6% Democrat, 48.4% Republican) made by US senators in 2021.
Model accuracy may not hold up on pieces of text longer than a tweet.
The following hyperparameters were used during training: