gosorio's picture
Update README.md
1676304
metadata
datasets:
  - argilla/tripadvisor-hotel-reviews
language:
  - en
metrics:
  - accuracy: 0.9018
  - F-1 score: 0.8956
pipeline_tag: text-classification

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).

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/minilmFT_TripAdvisor_Sentiment"
tokenizer_name = "microsoft/MiniLM-L12-H384-uncased" # the standard MiniLM
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)