public static AbstractPredictor getZooPredictor(DJLEndpoint endpoint)
            throws ModelNotFoundException, MalformedModelException, IOException {
        String applicationPath = endpoint.getApplication();

        // CV
        if (IMAGE_CLASSIFICATION.getPath().equals(applicationPath)) {
            return new ZooImageClassificationPredictor(endpoint);
        } else if (OBJECT_DETECTION.getPath().equals(applicationPath)) {
            return new ZooObjectDetectionPredictor(endpoint);
        } else if (SEMANTIC_SEGMENTATION.getPath().equals(applicationPath)) {
            return new ZooSemanticSegmentationPredictor(endpoint);
        } else if (INSTANCE_SEGMENTATION.getPath().equals(applicationPath)) {
            return new ZooInstanceSegmentationPredictor(endpoint);
        } else if (POSE_ESTIMATION.getPath().equals(applicationPath)) {
            return new ZooPoseEstimationPredictor(endpoint);
        } else if (ACTION_RECOGNITION.getPath().equals(applicationPath)) {
            return new ZooActionRecognitionPredictor(endpoint);
        } else if (WORD_RECOGNITION.getPath().equals(applicationPath)) {
            return new ZooWordRecognitionPredictor(endpoint);
        } else if (IMAGE_GENERATION.getPath().equals(applicationPath)) {
            return new ZooImageGenerationPredictor(endpoint);
        } else if (IMAGE_ENHANCEMENT.getPath().equals(applicationPath)) {
            return new ZooImageEnhancementPredictor(endpoint);
        }

        // NLP
        if (FILL_MASK.getPath().equals(applicationPath)) {
            return new ZooFillMaskPredictor(endpoint);
        } else if (QUESTION_ANSWER.getPath().equals(applicationPath)) {
            return new ZooQuestionAnswerPredictor(endpoint);
        } else if (TEXT_CLASSIFICATION.getPath().equals(applicationPath)) {
            return new ZooTextClassificationPredictor(endpoint);
        } else if (SENTIMENT_ANALYSIS.getPath().equals(applicationPath)) {
            return new ZooSentimentAnalysisPredictor(endpoint);
        } else if (TOKEN_CLASSIFICATION.getPath().equals(applicationPath)) {
            return new ZooTokenClassificationPredictor(endpoint);
        } else if (WORD_EMBEDDING.getPath().equals(applicationPath)) {
            return new ZooWordEmbeddingPredictor(endpoint);
        } else if (TEXT_GENERATION.getPath().equals(applicationPath)) {
            return new ZooTextGenerationPredictor(endpoint);
        } else if (MACHINE_TRANSLATION.getPath().equals(applicationPath)) {
            return new ZooMachineTranslationPredictor(endpoint);
        } else if (MULTIPLE_CHOICE.getPath().equals(applicationPath)) {
            return new ZooMultipleChoicePredictor(endpoint);
        } else if (TEXT_EMBEDDING.getPath().equals(applicationPath)) {
            return new ZooTextEmbeddingPredictor(endpoint);
        }

        // Tabular
        if (LINEAR_REGRESSION.getPath().equals(applicationPath)) {
            return new ZooLinearRegressionPredictor(endpoint);
        } else if (SOFTMAX_REGRESSION.getPath().equals(applicationPath)) {
            return new ZooSoftmaxRegressionPredictor(endpoint);
        }

        // Audio
        if (Application.Audio.ANY.getPath().equals(applicationPath)) {
            return new ZooAudioPredictor(endpoint);
        }

        // Time Series
        if (FORECASTING.getPath().equals(applicationPath)) {
            return new ZooForecastingPredictor(endpoint);
        }

        throw new RuntimeCamelException("Application not supported: " + applicationPath);
    }
@Test
    void testGetZooPredictor() throws ModelNotFoundException, MalformedModelException, IOException {
        // CV
        assertInstanceOf(ZooImageClassificationPredictor.class,
                getZooPredictor(zooEndpoint("cv/image_classification", "ai.djl.zoo:mlp:0.0.3")));
        assertInstanceOf(ZooObjectDetectionPredictor.class,
                getZooPredictor(zooEndpoint("cv/object_detection", "ai.djl.zoo:ssd:0.0.2")));
        assertInstanceOf(ZooSemanticSegmentationPredictor.class,
                getZooPredictor(zooEndpoint("cv/semantic_segmentation", "ai.djl.pytorch:deeplabv3:0.0.1")));
        assertInstanceOf(ZooInstanceSegmentationPredictor.class,
                getZooPredictor(zooEndpoint("cv/instance_segmentation", "ai.djl.mxnet:mask_rcnn:0.0.1")));
        assertInstanceOf(ZooPoseEstimationPredictor.class,
                getZooPredictor(zooEndpoint("cv/pose_estimation", "ai.djl.mxnet:simple_pose:0.0.1")));
        assertInstanceOf(ZooActionRecognitionPredictor.class,
                getZooPredictor(zooEndpoint("cv/action_recognition", "ai.djl.mxnet:action_recognition:0.0.1")));
        // No builtin zoo model available for "cv/word_recognition"
        assertInstanceOf(ZooImageGenerationPredictor.class,
                getZooPredictor(zooEndpoint("cv/image_generation", "ai.djl.pytorch:biggan-deep:0.0.1")));
        // No builtin zoo model available for "cv/image_enhancement"

        // NLP
        // No builtin zoo model available for "nlp/fill_mask"
        assertInstanceOf(ZooQuestionAnswerPredictor.class,
                getZooPredictor(zooEndpoint("nlp/question_answer", "ai.djl.pytorch:bertqa:0.0.1")));
        // No builtin zoo model available for "nlp/text_classification"
        assertInstanceOf(ZooSentimentAnalysisPredictor.class,
                getZooPredictor(zooEndpoint("nlp/sentiment_analysis", "ai.djl.pytorch:distilbert:0.0.1")));
        // No builtin zoo model available for "nlp/token_classification"
        assertInstanceOf(ZooWordEmbeddingPredictor.class,
                getZooPredictor(zooEndpoint("nlp/word_embedding", "ai.djl.mxnet:glove:0.0.2")));
        // No builtin zoo model available for "nlp/text_generation"
        // No builtin zoo model available for "nlp/machine_translation"
        // No builtin zoo model available for "nlp/multiple_choice"
        // No builtin zoo model available for "nlp/text_embedding"

        // Tabular
        // No builtin zoo model available for "tabular/linear_regression"
        // No builtin zoo model available for "tabular/softmax_regression"

        // Audio
        // No builtin zoo model available for "audio"

        // Time Series
        assertInstanceOf(ZooForecastingPredictor.class,
                getZooPredictor(zooEndpoint("timeseries/forecasting", "ai.djl.pytorch:deepar:0.0.1")));
    }