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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Using Colab to work with Hugging Face Transformers3m 7s
-
(Locked)
Loading the CNN Daily Mail dataset6m 5s
-
(Locked)
Cleaning text data2m 10s
-
(Locked)
Generating summaries with Hugging Face Transformers5m 27s
-
(Locked)
Evaluating summaries using ROUGE scores3m 49s
-
(Locked)
Summarizing text and computing aggregate ROUGE scores4m 9s
-
(Locked)
-
-
-