legacy-datasets/banking77
Viewer • Updated • 13.1k • 7.73k • 51
How to use Kwaku/social_media_sa with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Kwaku/social_media_sa") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Kwaku/social_media_sa")
model = AutoModelForSequenceClassification.from_pretrained("Kwaku/social_media_sa", device_map="auto")This is a fine-tuned version of the Distilbert model. It's best suited for sentiment-analysis.
Social Media Sentiment Analysis Model was trained on the dataset consisting of tweets obtained from Kaggle."
This model is meant for sentiment-analysis. Because it was trained on a corpus of tweets, it is familiar with social media jargons.
You can use this model directly with a pipeline for text generation:
>>>from transformers import pipeline
>>> model_name = "Kwaku/social_media_sa"
>>> generator = pipeline("sentiment-analysis", model=model_name)
>>> result = generator("I like this model")
>>> print(result)
Generated output: [{'label': 'positive', 'score': 0.9494990110397339}]
This model inherits the bias of its parent, Distilbert. Besides that, it was trained on only 1000 randomly selected sequences, and thus does not achieve a high probability rate. It does fairly well nonetheless.