From f9c13d7f4b67b8632ad22d319153cd20f65e051d Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 22 七月 2024 15:07:59 +0800
Subject: [PATCH] bugfix
---
funasr/auto/auto_model.py | 2 +-
funasr/utils/version_checker.py | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index 75324dc..d0a7733 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -114,7 +114,7 @@
try:
from funasr.utils.version_checker import check_for_update
- check_for_update()
+ check_for_update(disable=kwargs.get("disable_update", False))
except:
pass
diff --git a/funasr/utils/version_checker.py b/funasr/utils/version_checker.py
index 7597530..e7008bd 100644
--- a/funasr/utils/version_checker.py
+++ b/funasr/utils/version_checker.py
@@ -14,7 +14,9 @@
raise Exception("Failed to retrieve version information from PyPI.")
-def check_for_update():
+def check_for_update(disable=False):
+ if disable:
+ return
current_version = version.parse(__version__)
pypi_version = get_pypi_version("funasr")
--
Gitblit v1.9.1