From 725acc936728171620bb1c90da55e6bf6a161486 Mon Sep 17 00:00:00 2001 From: preciz Date: Wed, 7 Feb 2024 00:54:11 +0100 Subject: [PATCH] Downcase label before checking equality --- lib/bumblebee/text/zero_shot_classification.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bumblebee/text/zero_shot_classification.ex b/lib/bumblebee/text/zero_shot_classification.ex index 6b515306..05952eaf 100644 --- a/lib/bumblebee/text/zero_shot_classification.ex +++ b/lib/bumblebee/text/zero_shot_classification.ex @@ -38,7 +38,7 @@ defmodule Bumblebee.Text.ZeroShotClassification do entailment_id = Enum.find_value(spec.id_to_label, fn {id, label} -> - label == "entailment" && id + String.downcase(label) == "entailment" && id end) unless entailment_id do