Downloads · 30 days
2
0% of all-time downloads
gosorio/robertaSentimentFT_TripAdvisor
robertaSentimentFT_TripAdvisor is a text classification model from gosorio. Use it when you need a label for a piece of text. It is set up for transformers.
Sentiment analysis model that uses the Roberta sentiment tweet pre-trained model (from https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment), and fine-tuned on a dataset containing Trip Advisor reviews (fr…
Downloads · 30 days
2
0% of all-time downloads
All-time downloads
1.3K
Public
Repo size
997 MB
Likes
0
Public
Click a slice to open those files.
.bin499 MB · 100%
From the Hugging Face model README
Sentiment analysis model that uses the Roberta sentiment tweet pre-trained model (from https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment), and fine-tuned on a dataset containing Trip Advisor reviews (from https://www.kaggle.com/datasets/arnabchaki/tripadvisor-reviews-2023).
Reviews with 1 or 2 stars are considered 'Negative', 3 stars are 'Neutral', and 4 or 5 stars are 'Positive'.
Should be loaded with the following code:
# Load pre-trained model and tokenizer
model_name = "gosorio/robertaSentimentFT_TripAdvisor"
tokenizer_name = "cardiffnlp/twitter-roberta-base-sentiment"
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3).to(device)