diff options
Diffstat (limited to 'classification/main.py')
| -rwxr-xr-x | classification/main.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/classification/main.py b/classification/main.py index 742bb92f3..db54a3f3b 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" |