Views
No views yet
# 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)