gosorio commited on
Commit
cfab56c
·
1 Parent(s): 12fd01a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -0
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - argilla/tripadvisor-hotel-reviews
4
+ language:
5
+ - en
6
+ metrics:
7
+ - accuracy: 0.9018
8
+ - F-1 score: 0.8956
9
+ pipeline_tag: text-classification
10
+ ---
11
+ 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).
12
+
13
+ Reviews with 1 or 2 stars are considered 'Negative', 3 stars are 'Neutral', and 4 or 5 stars are 'Positive'.
14
+
15
+ Should be loaded with the following code:
16
+
17
+ ```
18
+ # Load pre-trained model and tokenizer
19
+ model_name = "gosorio/robertaSentimentFT_TripAdvisor"
20
+ tokenizer_name = "cardiffnlp/twitter-roberta-base-sentiment"
21
+ device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
22
+
23
+ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
24
+ model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3).to(device)
25
+ ```