From the course: AI Text Summarization with Hugging Face

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Generating summaries with Hugging Face Transformers

Generating summaries with Hugging Face Transformers - Hugging Face Tutorial

From the course: AI Text Summarization with Hugging Face

Generating summaries with Hugging Face Transformers

In this movie, we'll see how we can use the T5 transformer model from the Hugging Face library for text summarization using Zero-Shot Learning. Zero-shot learning allows us to leverage state-of-the-art NLP models with absolutely no training. These are pre-trained models that we can use right out of the box. With zero-shot learning, a model can learn to recognize things that it hasn't explicitly seen before in training. Now, usually zero-shot learning applies to problems such as classification, but here with summarization, I use it in the context that will ask the model to summarize text of a kind that the model has never seen before. Now the article that we'll ask the model to summarize is the article at this example text index, Index 33 from the training data, and it's an article about a cloned Labrador retriever. If you directly use a pre-trained model with zero-shot learning, really with Hugging Face, it's just 2 or 3 lines of code to actually use that model. Now the model that…

Contents