Skip to content

Commit

Permalink
Merge pull request #914 from weni-ai/hotfix/other-classification
Browse files Browse the repository at this point in the history
Fix other to false when classification was sucessful
  • Loading branch information
johncordeiro authored Mar 1, 2024
2 parents ead9a88 + 99155e7 commit 44e2be8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bothub/api/v2/zeroshot/usecases/format_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_classify(self, zeroshot_data):
all_classes = zeroshot_data.get("options")
for class_obj in all_classes:
if output == str(class_obj.get("id")):
classify["other"] = False
classify["classification"] = class_obj.get("class")
break

Expand Down

0 comments on commit 44e2be8

Please sign in to comment.