Implementation of a ML pipeline for the binary classification of Hotel review as "positive" or "negative".
The solution developed employes a pretrained version of the RoBERTa-base encoder architecture, replaces the classification head and fine-tunes it on the provided train dataset.
The complete project, with training strategy and dataset, is available at the following github repo.
model_name = "Matteo-Pannacci/bip-talent-week-2025"
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=2).to(device)