Model Card for tripadvisor_review_rater

Model Details

Model Description

This model predicts a 1–5 star rating based on English-language hotel reviews, fine-tuned on the TripAdvisor Hotel Reviews dataset.

Uses

Direct Use

  • Predict star ratings from hotel review text (1–5 stars)

Out-of-Scope Use

  • Not suitable for non-English text
  • Not recommended for commercial deployment without further validation

Bias, Risks, and Limitations

  • Reflects biases in the original TripAdvisor review data (e.g., regional, cultural, linguistic)
  • May struggle with sarcasm, slang, or subtle sentiment shifts

Recommendations

Users (both direct and downstream) should be made aware of the model’s limitations and potential biases. Further validation is advised before deployment in production or decision-making contexts.


How to Get Started with the Model

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("MLandMarketing/tripadvisor_review_rater")
model = AutoModelForSequenceClassification.from_pretrained("MLandMarketing/tripadvisor_review_rater")

review = "Room was clean and comfortable, but breakfast was disappointing."
inputs = tokenizer(review, return_tensors="pt", truncation=True, padding=True)
pred = model(**inputs).logits.argmax(dim=1).item()
print("Predicted Rating:", pred + 1)

Training Details

  • Data: TripAdvisor Hotel Reviews (20,000+ reviews)
  • Epochs: 3
  • Batch size: 16
  • Optimizer: AdamW
  • Loss function: CrossEntropyLoss
  • Final Train Loss: 0.64
  • Accuracy: 67.7%
  • Mean Absolute Error (MAE): 0.34 stars

Environmental Impact

  • Hardware: Google Colab GPU (Tesla T4)
  • Training time: ~1.3 hours
  • Cloud Provider: Google
  • Carbon Emitted: Minimal (small model, short training time)

Citation

BibTeX:

@misc{tripadvisorreviewrater2025,
  author       = {MLandMarketing},
  title        = {Tripadvisor Review Rater - BERT-based Review Rating Classifier},
  year         = {2025},
  howpublished = {\url{https://huggingface.co/MLandMarketing/tripadvisor_review_rater}}
}

APA:

MLandMarketing. (2025). Tripadvisor Review Rater - BERT-based Review Rating Classifier. Hugging Face. https://huggingface.co/MLandMarketing/tripadvisor_review_rater

Downloads last month
5
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