Commit e75b7476 by lichenggang

优化识别参数

parent 7756c9be
...@@ -41,6 +41,7 @@ class Classify(classify_pb2_grpc.classifyServicer): ...@@ -41,6 +41,7 @@ class Classify(classify_pb2_grpc.classifyServicer):
'status': 0, 'status': 0,
'err_msg': err_msg 'err_msg': err_msg
} }
bom_log.info(f'返回结果: ' + str(res))
return classify_pb2.ClassifyReply(message='result {msg}'.format(msg=res)) return classify_pb2.ClassifyReply(message='result {msg}'.format(msg=res))
def fac_test_predic(self, data): def fac_test_predic(self, data):
......
...@@ -61,6 +61,7 @@ class DictHandler(BaseHandler): ...@@ -61,6 +61,7 @@ class DictHandler(BaseHandler):
'status': 0, 'status': 0,
'err_msg': err_msg 'err_msg': err_msg
} }
bom_log.info(f'返回结果: ' + str(res))
self.write(res) self.write(res)
......
...@@ -205,7 +205,7 @@ class BasePredictor: ...@@ -205,7 +205,7 @@ class BasePredictor:
count = 0 count = 0
for i in data: for i in data:
for feature in feature_li: for feature in feature_li:
if feature in str(i).strip(): if feature in str(i).strip().lower():
count += 1 count += 1
break break
return round(count / len(data), 3) return round(count / len(data), 3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment