Skip to content

Commit 7785398

Browse files
authored
Update text_similarity.py
1 parent 0f168fd commit 7785398

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddlenlp/taskflow/text_similarity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def _run_model(self, inputs):
274274
if "rocketqa" in self.model_name or "ernie-search" in self.model_name:
275275
with static_mode_guard():
276276
for batch in inputs["data_loader"]:
277+
277278
if self._predictor_type == "paddle-inference":
278279
input_ids, segment_ids = self._batchify_fn(batch)
279280
self.input_handles[0].copy_from_cpu(input_ids)
@@ -282,7 +283,7 @@ def _run_model(self, inputs):
282283
scores = self.output_handle[0].copy_to_cpu().tolist()
283284
results.extend(scores)
284285
else:
285-
# onnx mode
286+
# onnx mode
286287
input_dict = {}
287288
input_ids, segment_ids = self._batchify_fn(batch)
288289
input_dict["input_ids"] = input_ids

0 commit comments

Comments
 (0)