Check for update. Args: disable: TODO.
(disable=False)
| 20 | |
| 21 | |
| 22 | def check_for_update(disable=False): |
| 23 | """Check for update. |
| 24 | |
| 25 | Args: |
| 26 | disable: TODO. |
| 27 | """ |
| 28 | current_version = version.parse(__version__) |
| 29 | print(f"funasr version: {current_version}.") |
| 30 | if disable: |
| 31 | return |
| 32 | |
| 33 | print( |
| 34 | "Check update of funasr, and it would cost few times. You may disable it by set `disable_update=True` in AutoModel" |
| 35 | ) |
| 36 | pypi_version = get_pypi_version("funasr") |
| 37 | |
| 38 | if current_version < pypi_version: |
| 39 | print(f"New version is available: {pypi_version}.") |
| 40 | print('Please use the command "pip install -U funasr" to upgrade.') |
| 41 | else: |
| 42 | print(f"You are using the latest version of funasr-{current_version}") |
no test coverage detected
searching dependent graphs…