Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
huggingface
GitHub Repository: huggingface/notebooks
Path: blob/main/course/zh-CN/chapter1/section10.ipynb
4491 views
Kernel: Unknown Kernel

章末小测验

Install the Transformers, Datasets, and Evaluate libraries to run this notebook.

!pip install datasets evaluate transformers[sentencepiece]
from transformers import pipeline ner = pipeline("ner", grouped_entities=True) ner("My name is Sylvain and I work at Hugging Face in Brooklyn.")
from transformers import pipeline filler = pipeline("fill-mask", model="bert-base-cased") result = filler("...")
from transformers import pipeline classifier = pipeline("zero-shot-classification") result = classifier("This is a course about the Transformers library")