This model takes the text from a Yelp review and predicts a label corresponding to the number of stars for the review. The labels are:

  • "Very Negative" = 1 star
  • "Negative" = 2 stars
  • "Neutral" = 3 stars
  • "Positive" = 4 stars
  • "Very Positive" = 5 stars

Example Inference Code:

from transformers import AutoTokenizer, pipeline

# Load the base model tokenizer
tokenizer = AutoTokenizer.from_pretrained('tabularisai/multilingual-sentiment-analysis')

# Load the classification pipeline with the specified model
pipe = pipeline("text-classification", model="Neleac/yelp-review-classifier", tokenizer=tokenizer)

# Classify a new Yelp review
review = "This is by far my favorite Panera location in the Pittsburgh area. \
        Friendly, plenty of room to sit, and good quality food & coffee. \
        Panera is a great place to hang out and read the news - they even have free WiFi! \
        Try their toasted sandwiches, especially the chicken bacon dijon."

result = pipe(review)

# Print the result
print(result) # [{'label': 'Very Positive', 'score': 0.7158929109573364}]

Author Information:

๐Ÿ‘พ Discord
๐Ÿ™ GitHub
๐Ÿค LinkedIn

Downloads last month
24
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Neleac/yelp-review-classifier

Dataset used to train Neleac/yelp-review-classifier

Evaluation results