Skip to main content

13 posts tagged with "NLP"

Natural Language Processing, Teaching Computers to Classify, Understand and Generate Text

View All Tags

Hugging Face Transformers Tutorial for NLP in Python — Part 1: Install Transformers and Run Your First Pipeline

· 31 min read
Jagdish Kumawat
Founder @ Dewiride

Hugging Face Transformers gives you thousands of pretrained language models and a few lines of Python to use them. In this first part you install Transformers and PyTorch, run your first pipeline on your computer's GPU, and build the first version of a project the whole series grows: a router that reads a customer's support message and decides what it's about.

How to Classify Text into Your Own Labels with Zero-Shot Classification

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

Zero-shot classification sorts text into labels you choose when you call it, such as "sports", "politics" and "technology", without training a model on them first. It works by asking a model trained for natural language inference whether each label fits the text. This guide classifies headlines with Hugging Face Transformers 5.24.1 and facebook/bart-large-mnli, and shows how the two main options change the scores.