2 Getting Started

 

This chapter covers

  • How to download and install Anaconda
  • How to create virtual environments using conda
  • How to start up Jupyter Notebook
  • How to install the Transformers library
  • How to make use of GPU in the pipeline() function
  • How to install the Hugging Face Hub package
  • How to use the Hugging Face Hub package to download files and perform authentication

2.1 Setting up the Development Environment

In chapter 1, you saw some of the exciting projects that you will be creating throughout this book using the Hugging Face pre-trained models as well as services such as AutoTrain. The main programming language you will be using is Python and personally my personal favorite IDE is Jupyter Notebook.

Jupyter Notebook is an open-source web application that allows you to create and share documents containing live code, equations, visualizations, and narrative text. It's widely used in data science, scientific research, machine learning, and education due to its interactive and exploratory nature.

In the following sections, you will learn how to setup Jupyter Notebook and how to create a virtual environment to work with all the examples in this book.

2.1.1 Downloading Anaconda

2.1.2 Creating Virtual Environments

2.1.3 Starting Jupyter Notebook

2.2 Installing the Transformers Library

2.2.1 Support for GPU

2.2.2 Using GPU in the Pipeline object

2.3 Installing the Hugging Face Hub Package

2.3.1 Downloading Files

2.3.2 Using the Hugging Face CLI

2.4 Summary