Congratulations!

Working with Hugging Face

Jacob H. Marquez

Lead Data Engineer

Chapter 1

$$

  • 🌐 Hugging Face Hub: A platform for discovering AI models and datasets

$$

  • 💾 Pre-trained Models: create pipelines and save them with .save_pretrained()

$$

  • 📊 Datasets: preprocess data using .filter() and .select()

Hugging Face logo

Working with Hugging Face

Chapter 2

Hugging Face pipelines

Working with Hugging Face

Text classification

  • 📊 Sentiment Analysis: Understand customer emotions

$$

  • 📝 Grammar Checks: Identify errors in text

$$

  • 🔓 Category Assignment: Classify requests with scores

$$

pipeline(task="text-classification")

Sentiment analysis

[{'label': 'POSITIVE', 'score': 0.97}]
Working with Hugging Face

Text summarization

Example of text summarization

  • 🔧 Pipeline: Specify pipeline(task="summarization")
  • 📜 Output Length: Adjust with min_length and max_length
Working with Hugging Face

Document Q&A

Finding an answer from the document

$$

$$

  • 📄 PDF Processing: Use .pages and .extract_text() from pypdf to extract text

$$

  • Q&A Pipeline: Specify pipeline(task="question-answering")
Working with Hugging Face

Auto Models and Tokenizers

More control and customization

Working with Hugging Face

Congratulations and Thank You!

Working with Hugging Face

Preparing Video For Download...