McAuley-Lab/Amazon-Reviews-2023
Updated • 47.2k • 294
How to use dnzblgn/Sentiment-Analysis-Customer-Reviews with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="dnzblgn/Sentiment-Analysis-Customer-Reviews") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("dnzblgn/Sentiment-Analysis-Customer-Reviews")
model = AutoModelForSequenceClassification.from_pretrained("dnzblgn/Sentiment-Analysis-Customer-Reviews")The model was trained on the McAuley-Lab/Amazon-Reviews-2023 dataset. This dataset contains labeled customer reviews from Amazon, focusing on two primary categories: Positive and Negative.
The model was evaluated using a subset of the Amazon reviews dataset, focusing on the binary classification of text as either positive or negative.
Accuracy: 0.98
Precision: 0.98
Recall: 0.99
F1-Score: 0.98
from transformers import pipeline
classifier = pipeline("text-classification", model="dnzblgn/Sentiment-Analysis-Customer-Reviews")
result = classifier("The product didn't arrive on time and was damaged.")
print(result)