We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f168fd commit 7785398Copy full SHA for 7785398
paddlenlp/taskflow/text_similarity.py
@@ -274,6 +274,7 @@ def _run_model(self, inputs):
274
if "rocketqa" in self.model_name or "ernie-search" in self.model_name:
275
with static_mode_guard():
276
for batch in inputs["data_loader"]:
277
+
278
if self._predictor_type == "paddle-inference":
279
input_ids, segment_ids = self._batchify_fn(batch)
280
self.input_handles[0].copy_from_cpu(input_ids)
@@ -282,7 +283,7 @@ def _run_model(self, inputs):
282
283
scores = self.output_handle[0].copy_to_cpu().tolist()
284
results.extend(scores)
285
else:
- # onnx mode
286
+ # onnx mode
287
input_dict = {}
288
289
input_dict["input_ids"] = input_ids
0 commit comments