huggingface / huggingface/course

Course is not adapted for local config

Open
#633 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
4.2k
Forks
1.4k
Avg merge
13m
Merged PRs (30d)
1

Description

On collab, the result is automatically show, but not in Local config.
In local, if a newbie try the code, nothing will happened, and the user will not understand why
for example on this course https://huggingface.co/learn/nlp-course/fr/chapter1/3?fw=pt

The user, must manually get the classifier result and print it

Something should be mentionned in this sens and the code adapted like

```
from transformers import pipeline

classifier = pipeline("sentiment-analysis")
result1 = classifier(
"I've been waiting for a HuggingFace course my whole life."
) # J'ai attendu un cours d'HuggingFace toute ma vie.

#[{'label': 'POSITIVE', 'score': 0.9598047137260437}]

result2 = classifier(
[
"I've been waiting for a HuggingFace course my whole life.",
"I hate this so much!",
] # « J'ai attendu un cours d'HuggingFace toute ma vie. », « Je déteste tellement ça ! »
)

print("result1", result1)
print("result2", result2)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.