mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
bugfix
This commit is contained in:
parent
e42f539eb8
commit
f9c13d7f4b
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user