Downloads · 30 days
12
17% of all-time downloads
Amey9766/BERT-hospitality-review-classifier
BERT-hospitality-review-classifier is a text classification model from Amey9766. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
BERT Hospitality Review Classifier is a fine-tuned bert-base-uncased model designed to classify hotel reviews into positive or negative sentiment. The model is trained on a large-scale hospitality-specific dataset to…
Downloads · 30 days
12
17% of all-time downloads
All-time downloads
71
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
BERT Hospitality Review Classifier is a fine-tuned bert-base-uncased model designed to classify hotel reviews into positive or negative sentiment.
The model is trained on a large-scale hospitality-specific dataset to capture nuanced language patterns commonly found in hotel guest feedback.
negative, positiveThe model is trained and evaluated using the kaenova/hotel-sentiment dataset from Hugging Face.
Dataset link: https://huggingface.co/datasets/kaenova/hotel-sentiment
The classification head was newly initialized and trained during fine-tuning, which is expected behavior when adapting BERT to a downstream task.
The model was evaluated on a held-out test set of 37,131 reviews.
| Metric | Score |
|---|---|
| Accuracy | 0.9690 |
| Precision | 0.9772 |
| Recall | 0.9668 |
| F1-score | 0.9720 |
| ROC-AUC | 0.9923 |
The ROC curve shows strong class separability, with an AUC of 0.9923, indicating excellent discriminative performance.
This behavior aligns with real-world hospitality feedback patterns.
This model is suitable for:
Amey Tillu Hospitality Data Analyst & AI/ML Hobbyist
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("Amey9766/BERT-hospitality-review-classifier")
model = AutoModelForSequenceClassification.from_pretrained("Amey9766/BERT-hospitality-review-classifier")
text = "The hotel was clean and staff were very helpful."
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=1).item()
label_map = {0: "negative", 1: "positive"}
print(label_map[prediction])