Skip to content

Commit 2ad9117

Browse files
authored
Change instr to outstr (PaddlePaddle#4558)
The first instr.strip is not use, change instr to outstr
1 parent cd9ac32 commit 2ad9117

File tree

1 file changed

+1
-1
lines changed
  • applications/question_answering/unsupervised_qa/finetune/question_generation

1 file changed

+1
-1
lines changed

Diff for: applications/question_answering/unsupervised_qa/finetune/question_generation/gen_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def post_process_sum(token_ids, tokenizer):
257257
def remove_template(instr):
258258
"""Remove template prefix of decoded sequence."""
259259
outstr = instr.strip("问题:")
260-
outstr = instr.strip("在已知答案的前提下,问题:")
260+
outstr = outstr.strip("在已知答案的前提下,问题:")
261261
return outstr
262262

263263

0 commit comments

Comments
 (0)