NLP - Sentiment Analysis Advanced
Given the following Python code snippet using the 'nlptown/bert-base-multilingual-uncased-sentiment' model, what will be the output sentiment label for the input text "Je suis très content" (French for "I am very happy")?
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained('nlptown/bert-base-multilingual-uncased-sentiment')
model = AutoModelForSequenceClassification.from_pretrained('nlptown/bert-base-multilingual-uncased-sentiment')
inputs = tokenizer("Je suis très content", return_tensors="pt")
outputs = model(**inputs)
probs = torch.nn.functional.softmax(outputs.logits, dim=1)
label = torch.argmax(probs).item() + 1 # labels 1 to 5
print(label)