Views
No views yet
tripadvisor_review_rater1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
3tokenizer = AutoTokenizer.from_pretrained("MLandMarketing/tripadvisor_review_rater")
4model = AutoModelForSequenceClassification.from_pretrained("MLandMarketing/tripadvisor_review_rater")
5
6review = "Room was clean and comfortable, but breakfast was disappointing."
7inputs = tokenizer(review, return_tensors="pt", truncation=True, padding=True)
8pred = model(**inputs).logits.argmax(dim=1).item()
9print("Predicted Rating:", pred + 1)1@misc{tripadvisorreviewrater2025,
2 author = {MLandMarketing},
3 title = {Tripadvisor Review Rater - BERT-based Review Rating Classifier},
4 year = {2025},
5 howpublished = {\url{https://huggingface.co/MLandMarketing/tripadvisor_review_rater}}
6}