优化案子处理逻辑

This commit is contained in:
2024-10-09 09:39:29 +08:00
parent a3fa1e502e
commit 795134f566
10 changed files with 257 additions and 304 deletions

View File

@@ -19,7 +19,8 @@ def main():
cls_result = CLAS(text)
cls_result = cls_result[0].get('predictions')[0]
if cls_result['score'] < 0.8:
raise Exception(f'识别结果置信度过低text: {text}')
logging.info(f"识别结果置信度{cls_result['score']}过低text: {text}")
return None
return cls_result['label']