Commit 5eb41f08 by ‘chizw’

[+]进程池优化

1 parent 8347c8a6
......@@ -45,7 +45,7 @@ class FunasrService(object):
@timeit
def transform(self):
res = model.generate(input=self.path, batch_size_s=100, hotword="""问界\n质保经理 80\n易损易耗件 80\n电瓶 80\nM5 80
res = model.generate(input=self.path, batch_size_s=300, hotword="""问界\n质保经理 80\n易损易耗件 80\n电瓶 80\nM5 80
\nM7 80\nM9 80\n石子 80\n橡胶棒 80\n电子助力泵 80\n电子真空助力泵 80\n充电桩 80\n密封圈 80\n4S店 80\n老化 80
""")
# print(res)
......
......@@ -52,7 +52,7 @@ class ConnPool:
self.close(conn, cursor)
log.info(f"execute_select_all result:{result}")
if str(result) == "()":
return None
return []
else:
return result
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!