summary refs log tree commit diff stats
path: root/classification/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'classification/main.py')
-rwxr-xr-xclassification/main.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/classification/main.py b/classification/main.py
index 742bb92f..db54a3f3 100755
--- a/classification/main.py
+++ b/classification/main.py
@@ -57,9 +57,8 @@ def main():
                 category = label
                 break
 
-            if label == "semantic" and score <= 0.91:
-                category = "other"
-                break
+        if result['labels'][0] == "semantic" and result['scores'][0] <= 0.91:
+            category = "other"
 
         if all(i > 0.9 for i in result["scores"]):
             category = "all"