Class ZeroShotClassificationTranslator.Builder

java.lang.Object
ai.djl.huggingface.translator.ZeroShotClassificationTranslator.Builder
Enclosing class:
ZeroShotClassificationTranslator

public static final class ZeroShotClassificationTranslator.Builder extends Object
The builder for zero-shot classification translator.
  • Method Details

    • optInt32

      public ZeroShotClassificationTranslator.Builder optInt32(boolean int32)
      Sets if use int32 datatype for the Translator.
      Parameters:
      int32 - true to include token types
      Returns:
      this builder
    • configure

      public void configure(Map<String,?> arguments)
      Configures the builder with the model arguments.
      Parameters:
      arguments - the model arguments
    • build

      Builds the translator.
      Returns:
      the new translator
      Throws:
      IOException - if I/O error occurs