Browse Source

修复图片审核函数存在bug

locky 2 years ago
parent
commit
c9550536a6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Object/ContentSecurityObject.py

+ 2 - 2
Object/ContentSecurityObject.py

@@ -79,7 +79,7 @@ class ContentSecurity:
         result_list = result.data.result
         # 配到风险标签且置信分高于80时返回False
         for result in result_list:
-            for result.label in IMAGE_ILLEGAL_LABEL_LIST:
+            if result.label in IMAGE_ILLEGAL_LABEL_LIST:
                 if result.confidence >= 80:
                     return False
-            return True
+        return True