summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-05 14:39:35 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-05 14:40:15 +0800
commit1a6d6edbe14f00df021a1e826d8d30555f301e30 (patch)
tree265d1877b77bb17b0491d05be3e3bdbe191e1935
parent6713e38407bdbc1495692c7e297c027a1dc3f612 (diff)
downloadbase-model-1a6d6edbe14f00df021a1e826d8d30555f301e30.tar.gz
base-model-1a6d6edbe14f00df021a1e826d8d30555f301e30.zip
fix: simplify conditional assignment for entity text processing in test_onnx_only_infer.py
-rw-r--r--tests/test_onnx_only_infer.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_onnx_only_infer.py b/tests/test_onnx_only_infer.py
index 69c72be..d41e7fd 100644
--- a/tests/test_onnx_only_infer.py
+++ b/tests/test_onnx_only_infer.py
@@ -187,9 +187,7 @@ for e in entities:
conf = round(float(np.mean(e["probs"])), 3)
typ = e["type"]
if typ in ("timestamp", "speaker"):
- ent_text = (
- fix_timestamp(ent_text) if typ == "timestamp" else fix_speaker(ent_text)
- )
+ ent_text = fix_timestamp(ent_text) if typ == "timestamp" else fix_speaker(ent_text)
out["metadata"][typ] = ent_text
else:
out["content"].append({"type": typ, "content": ent_text, "confidence": conf})