diff --git a/flash_examples/question_answering.py b/flash_examples/question_answering.py index beb2a7add8..ab2448fa09 100644 --- a/flash_examples/question_answering.py +++ b/flash_examples/question_answering.py @@ -13,8 +13,15 @@ # limitations under the License. from flash import Trainer from flash.core.data.utils import download_data +from flash.core.utilities.imports import example_requires from flash.text import QuestionAnsweringData, QuestionAnsweringTask +example_requires("text") + +import nltk # noqa: E402 + +nltk.download("punkt") + # 1. Create the DataModule download_data("https://pl-flash-data.s3.amazonaws.com/squad_tiny.zip", "./data/")