Introduction

Welcome to Hugging Face 101! This course will teach you the essentials of the Hugging Face ecosystem — home to hundreds of thousands of models, datasets, and interactive demos.

You’ll learn three ways to work with Hugging Face: through the web interface (no coding required), via APIs (for quick integration), or with Python libraries (for full control). Pick the approach that fits your project, or mix and match as needed!

What You’ll Learn

By the end of this course, you’ll know how to:

Not sure what some of these terms mean? Don’t worry! We’ll explain everything as we go. This course assumes no prior AI experience.

Course Structure

This course is divided into 8 chapters, each with a focus on a different aspect of Hugging Face.

  1. Introduction
  2. Introduction to Hugging Face - Learn about the Hugging Face ecosystem and how to get started
  3. Inference Providers - Learn about the different ways to use Hugging Face models
  4. Sharing Models - Learn how to share your own models with the community
  5. Sharing Datasets - Learn how to share your own datasets with the community
  6. Building Spaces - Learn how to build interactive demos with Hugging Face Spaces
  7. Building with Gradio - Learn how to build interactive demos with Gradio
  8. Evaluating Models - Learn how to evaluate AI models

Why Learn Hugging Face?

Hugging Face has become the go-to platform for AI development. Think of it as the GitHub for AI - where the community shares models, datasets, and applications. Recent innovations like the Model Context Protocol (MCP) are making AI models even more powerful by connecting them to external tools and data.

Whether you’re new to AI, a developer adding AI features to your app, or a researcher sharing your work, Hugging Face gives you the tools and community to succeed.

Why start here? Much of today’s open AI work is shared on Hugging Face. Learning the platform gives you fast access to new models, datasets, and examples.

Choose Your Learning Path

This course works for everyone, from complete beginners to experienced developers. Pick the path that matches your style:

🖥️ UI-First : Start with Web Interfaces

Perfect if you’re new to AI or prefer clicking over coding

🔌 API-First : Integration Through APIs

Ideal if you want to add AI to existing apps quickly

🐍 Code-First : Deep Dive with Python

Best if you want full control and customization

🌟 Mix and Match

The flexible approach - use whatever works for each project

Start with the web interface, add API calls when needed, then dive into code for advanced features.

**Not sure which path to pick?** Start with UI-First to get familiar with the concepts, then branch out as your needs grow. You can always switch paths later!

What You Need to Get Started

Everyone needs:

For API and Code paths, also helpful:

**UI-First learners**: You're all set! Skip ahead to Chapter 1 and start exploring through your browser.
**Windows users**: All the code examples work in Google Colab, so you don't need to install anything locally if you prefer not to.

Using Google Colab (Recommended for Beginners)

For Code-First and API-First paths. UI-First learners can skip to Chapter 1.

Google Colab is the easiest way to get started - no installation required! Just open a notebook in your browser and start coding.

New to Colab? Check out their introduction first. Colab gives you free access to GPUs and TPUs for AI experiments.

Ready? Create a new notebook and let’s install the libraries:

An empty colab notebook

Install the Hugging Face libraries with pip. In Colab, use ! before pip commands:

# Core libraries for this course
!pip install huggingface_hub transformers datasets gradio

# Optional: MCP client and tooling support
!pip install -U "huggingface_hub[mcp]"

Test that everything installed correctly:

import huggingface_hub
import transformers
import datasets
import gradio

print("✅ Ready to go!")
**Installation taking forever?** That's normal - these libraries are pretty big. Grab a coffee and wait for the green checkmarks!
A gif showing the result of the installation commands

What Each Library Does

To use the Model Context Protocol (MCP) client and tiny-agents, install the mcp extra: pip install -U "huggingface_hub[mcp]".

You’re now ready for all the projects in this course!

Local Python Setup (Advanced)

For experienced developers who want to work locally instead of Colab.

If you prefer local development, first install Python from python.org or follow this detailed guide.

Verify Python is installed:

python --version

We recommend using virtual environments to avoid package conflicts. Think of them as isolated Python setups for different projects.

Create a project directory and virtual environment:

# Create and enter your project directory
mkdir ~/huggingface-course
cd ~/huggingface-course

# Create virtual environment
python -m venv .env

# Activate it (Mac/Linux)
source .env/bin/activate

# On Windows, use:
# .env\Scripts\activate

When activated, your terminal prompt will change to show (.env). To deactivate later, just run deactivate.

**Pro tip**: Always activate your virtual environment before installing packages or running Python scripts for this course!

Install the Libraries

Now install the same Hugging Face libraries:

pip install huggingface_hub transformers datasets gradio
pip install -U "huggingface_hub[mcp]"  # Optional MCP support

Test the installation:

python -c "import huggingface_hub, transformers, datasets, gradio; print('✅ Ready to go!')"

Get Your Access Token

To upload models, create private repos, and access gated models, you’ll need to authenticate:

from huggingface_hub import login
login()

This will ask for your Hugging Face token. Get yours from huggingface.co/settings/tokens.

**Don't have a token yet?** You can still follow most of the course without one. Create a token when you're ready to start uploading your own models and datasets.

What’s Next?

You’re ready to start! Here’s where to go based on your chosen path:

The great thing about Hugging Face is that all these approaches work together. Start simple, then add complexity as your projects grow.

Let’s get started.

< > Update on GitHub