mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
fix demo service
This commit is contained in:
parent
1f0f44bd07
commit
586c7024ef
@ -13,7 +13,6 @@ logger.setLevel(logging.CRITICAL)
|
||||
inference_pipeline = pipeline(
|
||||
task=Tasks.punctuation,
|
||||
model='damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727',
|
||||
model_revision="v1.0.0",
|
||||
output_dir="./tmp/"
|
||||
)
|
||||
|
||||
|
||||
@ -69,6 +69,7 @@ class Text2Punc:
|
||||
precache = "".join(cache)
|
||||
else:
|
||||
precache = ""
|
||||
cache = []
|
||||
data = {"text": precache + text}
|
||||
result = self.preprocessor(data=data, uid="12938712838719")
|
||||
split_text = self.preprocessor.pop_split_text_data(result)
|
||||
@ -233,7 +234,6 @@ def inference_modelscope(
|
||||
item = {'key': key, 'value': ""}
|
||||
results.append(item)
|
||||
return results
|
||||
#import pdb;pdb.set_trace()
|
||||
result, _, cache = text2punc(line, cache)
|
||||
item = {'key': key, 'value': result, 'cache': cache}
|
||||
results.append(item)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user