huggingface / huggingface/course
sentiment analysis does not predict as expected
- Dominant language
- MDX
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 13m
- Merged PRs (30d)
- 1
Description
on this page https://huggingface.co/learn/nlp-course/fr/chapter2/2?fw=pt
this code
```
from transformers import pipeline
classifier = pipeline("sentiment-analysis")
classifier(
[
"I've been waiting for a HuggingFace course my whole life.",
# J'ai attendu un cours de HuggingFace toute ma vie.
"I hate this so much!", # Je déteste tellement ça !
]
)
```
should give us Positive and Negative
```
[{'label': 'POSITIVE', 'score': 0.9598047137260437},
{'label': 'NEGATIVE', 'score': 0.9994558095932007}]
```
But on the Google Collab https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/fr/chapter2/section2_pt.ipynb, with French phrases we've got NEGATIVE and NEGATIVE
```
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="tblard/tf-allocine")
classifier(
["J'ai attendu un cours d'HuggingFace toute ma vie.",
"Je déteste tellement ça !"]
)
```

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.