Skip to content

Commit

Permalink
Fix other to false when classification was sucessful
Browse files Browse the repository at this point in the history
  • Loading branch information
John Cordeiro committed Mar 1, 2024
1 parent ead9a88 commit 99155e7
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 99155e7

Please sign in to comment.