From 0281b70896bd8069a9d26dad1ef2b5090ae5fc4a Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期四, 25 一月 2024 10:20:31 +0800
Subject: [PATCH] update umap import

---
 funasr/auto/auto_model.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index 6d74f81..5f89dd6 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -146,7 +146,7 @@
         set_all_random_seed(kwargs.get("seed", 0))
         
         device = kwargs.get("device", "cuda")
-        if not torch.cuda.is_available() or kwargs.get("ngpu", 0):
+        if not torch.cuda.is_available() or kwargs.get("ngpu", 0) == 0:
             device = "cpu"
             kwargs["batch_size"] = 1
         kwargs["device"] = device
@@ -377,7 +377,7 @@
                             result[k] = restored_data[j][k]
                         else:
                             result[k] = torch.cat([result[k], restored_data[j][k]], dim=0)
-                    elif k == 'text':
+                    elif k == 'raw_text':
                         if k not in result:
                             result[k] = restored_data[j][k]
                         else:

--
Gitblit v1.9.1