ProsusAI/FinBert only one sentiment value via transformers library
I’m using this model via transformers library on a local machine.  The model is only returning one sentiment word and one value.  The hosted HF endpoint versionherelooks to return all three sentiments and values.  Is this an intentional limitation or am I doing something wrong on my end?from transformers import AutoTokenizer, TFAutoModelForSequenceClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("ProsusAI/finbert")
model = TFAutoModelForSequenceClassification.from_pretrained("ProsusAI/finbert")
sa_finbert = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
headline = "Chicken Soup for the Soul Entertainment Launches Advertising Sales Platform Crackle Connex"
result = sa_finbert(headline)
print(result)[{'label': 'negative', 'score': 0.42233529686927795}]
2023-11-23T12:19:58Z
I know this post is from a while ago, but I ran into a similar issue before coming across the top_k parameter as part of the pipeline() function. So if you update:pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)topipeline("sentiment-analysis", model=model, tokenizer=tokenizer, top_k=3)Your issue should be resolved.