This commit is contained in:
游雁 2024-07-22 15:07:59 +08:00
parent e42f539eb8
commit f9c13d7f4b
2 changed files with 4 additions and 2 deletions

View File

@ -114,7 +114,7 @@ class AutoModel:
try: try:
from funasr.utils.version_checker import check_for_update from funasr.utils.version_checker import check_for_update
check_for_update() check_for_update(disable=kwargs.get("disable_update", False))
except: except:
pass pass

View File

@ -14,7 +14,9 @@ def get_pypi_version(package_name):
raise Exception("Failed to retrieve version information from PyPI.") 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__) current_version = version.parse(__version__)
pypi_version = get_pypi_version("funasr") pypi_version = get_pypi_version("funasr")