# Step 7: Inference on a new sample sample_text = "This is a fantastic movie. I really enjoyed it." sample_inputs = tokenizer(sample_text, padding="max_length", truncation=True, max_length=512, return_tensors="pt") # Move inputs to device (if GPU available) sample_inputs.to(training_args.device) # Make prediction predictions = model(**sample_inputs) predicted_class = predictions.logits.argmax(-1).item() if predicted_class == 1: print("Positive sentiment") else: print("Negative sentiment")