From 45bde45ae65a91efd1c9d9b53dec010e3ccf3f8d Mon Sep 17 00:00:00 2001 From: Yih-Dar SHIEH Date: Mon, 25 Oct 2021 08:19:08 +0000 Subject: [PATCH] Update pipeline.py --- pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipeline.py b/pipeline.py index 0b6bbc8..1d9894b 100644 --- a/pipeline.py +++ b/pipeline.py @@ -53,4 +53,6 @@ class PreTrainedPipeline(): preds = self.tokenizer.batch_decode(output_ids, skip_special_tokens=True) preds = [pred.strip() for pred in preds] + preds = [{"label": preds[0], "score": 1.0}] + return preds