| | |
| | | try: |
| | | from funasr.utils.version_checker import check_for_update |
| | | |
| | | print( |
| | | "Check update of funasr, and it would cost few times. You may disable it by set `disable_update=True` in AutoModel" |
| | | ) |
| | | check_for_update(disable=kwargs.get("disable_update", False)) |
| | | except: |
| | | pass |
| | |
| | | |
| | | def inference(self, input, input_len=None, model=None, kwargs=None, key=None, **cfg): |
| | | kwargs = self.kwargs if kwargs is None else kwargs |
| | | if "cache" in kwargs: |
| | | kwargs.pop("cache") |
| | | deep_update(kwargs, cfg) |
| | | model = self.model if model is None else model |
| | | model.eval() |