install funasr from pypi
This commit is contained in:
@ -2,7 +2,6 @@ import os
|
|||||||
|
|
||||||
import hydra
|
import hydra
|
||||||
import torch
|
import torch
|
||||||
from funasr import AutoModel
|
|
||||||
from omegaconf import DictConfig, ListConfig, OmegaConf
|
from omegaconf import DictConfig, ListConfig, OmegaConf
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +27,9 @@ def main_hydra(cfg: DictConfig):
|
|||||||
if torch.backends.mps.is_available()
|
if torch.backends.mps.is_available()
|
||||||
else "cpu"
|
else "cpu"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from funasr import AutoModel
|
||||||
|
|
||||||
model = AutoModel(
|
model = AutoModel(
|
||||||
model=model_dir,
|
model=model_dir,
|
||||||
trust_remote_code=True,
|
trust_remote_code=True,
|
||||||
|
|||||||
4
demo1.py
4
demo1.py
@ -1,5 +1,4 @@
|
|||||||
import torch
|
import torch
|
||||||
from funasr import AutoModel
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -11,6 +10,9 @@ def main():
|
|||||||
if torch.backends.mps.is_available()
|
if torch.backends.mps.is_available()
|
||||||
else "cpu"
|
else "cpu"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from funasr import AutoModel
|
||||||
|
|
||||||
model = AutoModel(
|
model = AutoModel(
|
||||||
model=model_dir,
|
model=model_dir,
|
||||||
trust_remote_code=True,
|
trust_remote_code=True,
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install git+https://github.com/modelscope/FunASR
|
pip install funasr>=1.3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
## Data Prepare
|
## Data Prepare
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
## 安装训练环境
|
## 安装训练环境
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install git+https://github.com/modelscope/FunASR
|
pip install funasr>=1.3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
## 数据准备
|
## 数据准备
|
||||||
|
|||||||
Reference in New Issue
Block a user