# ProsusAI/FinBert only one sentiment value via transformers library

**URL:** <https://discuss.huggingface.co/t/prosusai-finbert-only-one-sentiment-value-via-transformers-library/38149>\
**Category:** Models\
**Created:** [April 29, 2023, 8:10pm UTC](https://discuss.huggingface.co/t/prosusai-finbert-only-one-sentiment-value-via-transformers-library/38149 "2023-04-29T20:10:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rivero](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@rivero](https://discuss.huggingface.co/u/rivero)\
**Post date:** [April 29, 2023, 8:10pm UTC](https://discuss.huggingface.co/t/prosusai-finbert-only-one-sentiment-value-via-transformers-library/38149/1 "2023-04-29T20:10:16Z")

</div>

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 version [here](https://huggingface.co/ProsusAI/finbert) looks to return all three sentiments and values. Is this an intentional limitation or am I doing something wrong on my end?

```auto
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)

```

```auto
[{'label': 'negative', 'score': 0.42233529686927795}]

```

---

<div class="post-metadata">

**Author:** ![conrad10781](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/conrad10781/32/21447_2.png) [@conrad10781](https://discuss.huggingface.co/u/conrad10781)\
**Post date:** [November 23, 2023, 12:19pm UTC](https://discuss.huggingface.co/t/prosusai-finbert-only-one-sentiment-value-via-transformers-library/38149/2 "2023-11-23T12:19:58Z")

</div>

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)`

to

`pipeline("sentiment-analysis", model=model, tokenizer=tokenizer, top_k=3)`

Your issue should be resolved.
