From 8c87a9d8a7c2f136053476670a9a83980f142aec Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 28 六月 2024 17:28:09 +0800
Subject: [PATCH] Dev gzf deepspeed (#1858)
---
funasr/download/download_from_hub.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/funasr/download/download_from_hub.py b/funasr/download/download_from_hub.py
index 46263c9..df4f33d 100644
--- a/funasr/download/download_from_hub.py
+++ b/funasr/download/download_from_hub.py
@@ -84,6 +84,14 @@
from funasr.utils.install_model_requirements import install_requirements
install_requirements(requirements)
+ if kwargs.get("trust_remote_code", False):
+ from funasr.utils.dynamic_import import import_module_from_path
+
+ model_code = kwargs.get("remote_code", "model")
+ import_module_from_path(model_code)
+
+ # from funasr.register import tables
+ # tables.print("model")
return kwargs
--
Gitblit v1.9.1