From 4e7f5d075f98eb4f837f21be1dc498912ae31830 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期五, 01 三月 2024 16:24:04 +0800
Subject: [PATCH] update deploy tools

---
 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