Project 6 of 10

Text Summarizer & Q&A Tool

Lessons

About This Project

Two of the most useful things a language model can do with a long text are summarize it and answer questions about it. A summarizer condenses an article into a few sentences that keep the main message. A question answering tool takes a passage and a question, then finds the part of the passage that answers it.

The lessons start with a summarization pipeline built with Hugging Face Transformers in just a few lines of code, then go deeper into how pretrained Transformer models produce a summary. The last lesson looks inside the question answering pipeline, so you see how a model turns a question and a context into an answer.

Watch the lessons in order and code along in Google Colab or a Jupyter notebook. Once both parts work, combine them into one small app: paste in an article, show its summary, and let the user ask questions about it.

Lessons

3 videos
01

AI Text Summarization with Hugging Face Transformers in 4 Lines of Python

Install Hugging Face Transformers, load a pretrained summarization pipeline, generate a summary and customize it with parameters such as maximum length.

Video
02

Text Summarization with HuggingFace Transformers

Build a summarization pipeline for your own English texts and see how a pretrained Transformer model condenses them.

Video
03

Inside the Question Answering Pipeline

See how the question answering pipeline works: tokenize a question with its context, run the model and extract the answer from the context.

Video