Building NLP Applications with Hugging Face

5 Jan 2024 · 45 min
44:33

In this comprehensive tutorial Jacob Marquez walks viewers through a hands‑on project that applies a suite of natural language processing (NLP) techniques using Hugging Face’s Transformers and Sentence‑Transformers libraries. Starting with a brief setup, he loads a subset of the Rent the Runway review dataset, inspects its schema, and parses dates. He then demonstrates a thorough text‑cleaning pipeline (removing special characters, punctuation, digits, extra whitespace, and lower‑casing) while noting the debate over preprocessing for transformer models. Using the cleaned text, he builds a sentiment‑analysis pipeline with a DistilBERT model fine‑tuned on SST‑2, extracts sentiment categories and scores, and visualizes their distribution and temporal trends. He compares this pipeline to one run on raw text, using a confusion matrix to assess the impact of cleaning. Next, he generates sentence embeddings for the "rented_for" column with the all‑MiniLM‑L6‑v2 model, reduces the 384‑dimensional vectors to two dimensions via t‑SNE, and visualizes clusters colored by product category, interpreting the semantic separation of dresses versus gowns. He then showcases semantic search by embedding a natural‑language query and retrieving the most similar reviews. Finally, he illustrates generative text creation with a GPT‑2 pipeline, prompting a marketing copy for a winter dress. Throughout, Jacob emphasizes practical code snippets, debugging tips, and business‑oriented insights, encouraging learners to experiment further with Hugging Face’s model hub and pipeline versatility.

Chapters

More from Richie

youtube.com

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

5mo ago
youtube.com

17.8% of the World Now Uses AI — And the Gap Is Widening | The Median #5

5mo ago
youtube.com

Create GPTs to Automate Go-To-Market Research

5mo ago
youtube.com

What Happened to Self-Driving Cars? #AI

5mo ago
youtube.com

Never Use AI For This #warning #AI #flights

5mo ago
youtube.com

Use AI Agents to Analyze Power Grid Optimization

5mo ago
youtube.com

This is how modern AI actually solves problems #AITrends #AI

5mo ago
youtube.com

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

5mo ago
youtube.com

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

5mo ago
youtube.com

Build an AI‑driven Dashboard

5mo ago
youtube.com

What’s Broken in Labor Markets Today #datascience

5mo ago
See all content