Different results for the same mrm8488/t5-base-finetuned-emotion
I’m using mrm8488/t5-base-finetuned-emotion for emotion recognition.The problem is that for the text input “Arigato AKIRA. Thanks Japan”,On model page’s hosted inference API, I get “joy”, which is correct.But when I run the model on Colab, I get “anger” for both models provided in the documentation (AutoModelWithLMHead and AutoModelForSeq2SeqLM)What is happening and how can I fix this?Here is the link to colabcolab.research.google.comGoogle Colaboratory
2022-05-20T05:39:54Z
I actually realized that simply usingpipelinesolves the problem.I guess the problme was caused by model and tokenizer?Any insight or advice would still be appreciated!from transformers import pipeline
classifier = pipeline("text2text-generation", model="mrm8488/t5-base-finetuned-emotion")
classifier("Arigato AKIRA. Thanks Japan  ❤️❤️❤️❤️❤️❤️❤️❤️♥️♥️♥️♥️♥️♥️♥️")
# Outputs: [{'generated_text': 'joy'}]