From cae334c43c49aa770d9dac1ee48319679ee8c72c Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Wed, 18 Mar 2020 17:11:42 +0100 Subject: [PATCH] Improve fill-mask pipeline example in 03-pipelines notebook. Remove hardcoded mask_token and use the value provided by the tokenizer. --- notebooks/03-pipelines.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/03-pipelines.ipynb b/notebooks/03-pipelines.ipynb index 483fbe758f..908cb004a3 100644 --- a/notebooks/03-pipelines.ipynb +++ b/notebooks/03-pipelines.ipynb @@ -294,7 +294,7 @@ ], "source": [ "nlp_fill = pipeline('fill-mask')\n", - "nlp_fill('Hugging Face is a French company based in ')" + "nlp_fill('Hugging Face is a French company based in ' + nlp_fill.tokenizer.mask_token)" ] }, {