浏览代码

fix: machine learning only take results with > 90% confidence (#1875)

Zack Pollard 2 年之前
父节点
当前提交
3d468c369c
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      machine-learning/src/main.py

+ 2 - 5
machine-learning/src/main.py

@@ -45,11 +45,8 @@ def run_engine(engine, path):
 
     for index, pred in enumerate(predictions):
         tags = pred['label'].split(', ')
-        if (index == 0):
-            result = tags
-        else:
-            if (pred['score'] > 0.5):
-                result = [*result, *tags]
+        if (pred['score'] > 0.9):
+            result = [*result, *tags]
 
     if (len(result) > 1):
         result = list(set(result))