From the course: Applied AI: Getting Started with Hugging Face Transformers

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Reviewing pipeline tasks

Reviewing pipeline tasks

- [Instructor] The code for this chapter is available in the Notebook Code_05_XX Sentiment Analysis with Transformers. Let's open this Notebook now. Please select the right Python version for executing the Notebook. We begin with importing the transformers package. This package contains all related functions to access, use, and manipulate Hugging Face artifacts. We will also set the logging level for the transformers package to error. Otherwise, a lot of verbose trace messages will be printed when executing functions in this library. Now, let's first import the PIPELINE_REGISTRY. This contains general purpose methods to explore the Hugging Face PIPELINE_REGISTRY. We will print the list of supported tasks. This shows the list of tasks that are supported as pipelines in Hugging Face. You will notice that most of these tasks are NLP tasks, but there are also computer vision tasks like object-detection. We see the sentiment-analysis task, which we will use for this chapter. We can get…

Contents