From d4b683433a9f922c857cbde46741fd2ec0402d9c Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 10 二月 2023 18:42:52 +0800
Subject: [PATCH] export model
---
funasr/export/export_model.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/export/export_model.py b/funasr/export/export_model.py
index de6aff8..514bf55 100644
--- a/funasr/export/export_model.py
+++ b/funasr/export/export_model.py
@@ -69,7 +69,7 @@
model_dir = tag_name
if model_dir.startswith('damo/'):
from modelscope.hub.snapshot_download import snapshot_download
- model_dir = snapshot_download(tag_name, cache_dir=self.cache_dir)
+ model_dir = snapshot_download(model_dir, cache_dir=self.cache_dir)
asr_train_config = os.path.join(model_dir, 'config.yaml')
asr_model_file = os.path.join(model_dir, 'model.pb')
cmvn_file = os.path.join(model_dir, 'am.mvn')
@@ -87,7 +87,7 @@
model, asr_train_args = ASRTask.build_model_from_file(
asr_train_config, asr_model_file, cmvn_file, 'cpu'
)
- self.export(model, tag_name)
+ self._export(model, tag_name)
# def export_from_modelscope(
# self,
--
Gitblit v1.9.1