From 3547adb4fb8b8284afefb8413382592fcdfa0302 Mon Sep 17 00:00:00 2001
From: Daniel <znsoft@163.com>
Date: 星期二, 07 三月 2023 12:18:06 +0800
Subject: [PATCH] Merge branch 'alibaba-damo-academy:main' into main

---
 funasr/runtime/triton_gpu/model_repo_paraformer_large_offline/scoring/1/model.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/funasr/runtime/triton_gpu/model_repo_paraformer_large_offline/scoring/1/model.py b/funasr/runtime/triton_gpu/model_repo_paraformer_large_offline/scoring/1/model.py
index dfbaa52..ef6278d 100644
--- a/funasr/runtime/triton_gpu/model_repo_paraformer_large_offline/scoring/1/model.py
+++ b/funasr/runtime/triton_gpu/model_repo_paraformer_large_offline/scoring/1/model.py
@@ -21,8 +21,7 @@
 
 import json
 import os
-
-import pickle
+import yaml
 
 class TritonPythonModel:
     """Your Python model must use the same class name. Every Python model
@@ -76,8 +75,8 @@
         load lang_char.txt
         """
         with open(str(vocab_file), 'rb') as f:
-            token_list = pickle.load(f)
-        return token_list
+            config = yaml.load(f, Loader=yaml.Loader)
+        return config['token_list']
 
     def execute(self, requests):
         """`execute` must be implemented in every Python model. `execute`

--
Gitblit v1.9.1