Instructions to use MLandMarketing/tripadvisor_review_rater with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MLandMarketing/tripadvisor_review_rater with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="MLandMarketing/tripadvisor_review_rater")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("MLandMarketing/tripadvisor_review_rater") model = AutoModelForSequenceClassification.from_pretrained("MLandMarketing/tripadvisor_review_rater", device_map="auto") - Notebooks
- Google Colab
- Kaggle
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.
- Developed by: @MLandMarketing
- Model type: Text classification (5-class sentiment rating prediction)
- Language(s) (NLP): English
- License: MIT
- Finetuned from model: bert-base-uncased
- Repository: tripadvisor_review_rater
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