gosorio commited on
Commit
1676304
1 Parent(s): b29f967

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -2
README.md CHANGED
@@ -1,6 +1,26 @@
 
 
 
 
 
 
 
 
 
 
1
  Sentiment analysis model that uses MiniLM pre-trained (from https://huggingface.co/microsoft/MiniLM-L12-H384-uncased), and fine-tuned on a dataset containing Trip Advisor reviews (from https://www.kaggle.com/datasets/arnabchaki/tripadvisor-reviews-2023).
2
 
3
  Reviews with 1 or 2 stars are considered 'Negative', 3 stars are 'Neutral', and 4 or 5 stars are 'Positive'.
4
 
5
- Accuracy on test set == 0.9018
6
- F-1 score on test set == 0.8956
 
 
 
 
 
 
 
 
 
 
 
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 MiniLM pre-trained (from https://huggingface.co/microsoft/MiniLM-L12-H384-uncased), 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
+ ```
19
+ # Load pre-trained model and tokenizer
20
+ model_name = "gosorio/minilmFT_TripAdvisor_Sentiment"
21
+ tokenizer_name = "microsoft/MiniLM-L12-H384-uncased" # the standard MiniLM
22
+ device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
23
+
24
+ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
25
+ model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3).to(device)
26
+ ```