From 228c58a494f2f6816f4299e565862b64818cc10d Mon Sep 17 00:00:00 2001 From: westfish Date: Wed, 2 Nov 2022 16:00:06 +0800 Subject: [PATCH] fix bug about template 3 (#3646) --- paddlenlp/taskflow/question_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddlenlp/taskflow/question_generation.py b/paddlenlp/taskflow/question_generation.py index 4807cfd7cc1e..b6472c18ad66 100644 --- a/paddlenlp/taskflow/question_generation.py +++ b/paddlenlp/taskflow/question_generation.py @@ -191,7 +191,7 @@ def _convert_example(self, target = '在已知答案的前提下,问题:' + target elif self._template == 3: ### use template 3 - source = '这是一个问题生成任务,根据提供的答案和上下文,来生成问题。' + title + tokenizer.sep_token + '上下文:' + source + source = '这是一个问题生成任务,根据提供的答案和上下文,来生成问题。' + title + self._tokenizer.sep_token + '上下文:' + source title = None if target: target = '问题:' + target