From c456abaf33023038be686f18df6a1178367d3894 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 29 二月 2024 16:23:52 +0800
Subject: [PATCH] Dev gzf (#1405)
---
funasr/models/llm_asr_nar/model.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/funasr/models/llm_asr_nar/model.py b/funasr/models/llm_asr_nar/model.py
index 6a4ecce..db81c47 100644
--- a/funasr/models/llm_asr_nar/model.py
+++ b/funasr/models/llm_asr_nar/model.py
@@ -315,7 +315,10 @@
model_outputs = self.llm(inputs_embeds=inputs_embeds, attention_mask=attention_mask, labels=None)
preds = torch.argmax(model_outputs.logits, -1)
text = tokenizer.batch_decode(preds, add_special_tokens=False, skip_special_tokens=True)
- text = text[0].split(': \n')[-1]
+
+ text = text[0].split(': ')[-1]
+ text = text.strip()
+
# preds = torch.argmax(model_outputs.logits, -1)
ibest_writer = None
--
Gitblit v1.9.1