From 679ee2ee2297a1cab3c1bc4c9ea32c31d3bafbf3 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 06 三月 2023 15:58:30 +0800
Subject: [PATCH] Merge pull request #188 from yuekaizhang/client_doc

---
 funasr/runtime/triton_gpu/model_repo_paraformer_large_offline/scoring/1/model.py |    6 ++----
 1 files changed, 2 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..0377033 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
@@ -22,8 +22,6 @@
 import json
 import os
 
-import pickle
-
 class TritonPythonModel:
     """Your Python model must use the same class name. Every Python model
     that is created must have "TritonPythonModel" as the class name.
@@ -75,8 +73,8 @@
         """
         load lang_char.txt
         """
-        with open(str(vocab_file), 'rb') as f:
-            token_list = pickle.load(f)
+        with open(str(vocab_file), 'r') as f:
+            token_list = [line.strip() for line in f]
         return token_list
 
     def execute(self, requests):

--
Gitblit v1.9.1