From fa9a6cdb1eade68c258eed7297f5a8a8a5329ac6 Mon Sep 17 00:00:00 2001
From: Flute <41096447+fluteink@users.noreply.github.com>
Date: 星期三, 01 十月 2025 14:44:28 +0800
Subject: [PATCH] 更新文档和运行脚本,修复文档拼写错误 (#2688)
---
funasr/download/download_model_from_hub.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/funasr/download/download_model_from_hub.py b/funasr/download/download_model_from_hub.py
index c826b5f..80aa588 100644
--- a/funasr/download/download_model_from_hub.py
+++ b/funasr/download/download_model_from_hub.py
@@ -1,3 +1,4 @@
+import logging
import os
import json
from omegaconf import OmegaConf, DictConfig
@@ -79,7 +80,10 @@
kwargs["jieba_usr_dict"] = os.path.join(model_or_path, "jieba_usr_dict")
if isinstance(kwargs, DictConfig):
kwargs = OmegaConf.to_container(kwargs, resolve=True)
- if os.path.exists(os.path.join(model_or_path, "requirements.txt")):
+ logging.warning(f'trust_remote_code: {kwargs.get("trust_remote_code", False)}')
+ if os.path.exists(os.path.join(model_or_path, "requirements.txt")) and kwargs.get(
+ "trust_remote_code", False
+ ):
requirements = os.path.join(model_or_path, "requirements.txt")
print(f"Detect model requirements, begin to install it: {requirements}")
from funasr.utils.install_model_requirements import install_requirements
--
Gitblit v1.9.1