From f7e6d2d1d729ffcb34f9c1bc43fa72c9f4361afa Mon Sep 17 00:00:00 2001 From: Prabod Rathnayaka Date: Wed, 30 Oct 2024 04:58:26 +0000 Subject: [PATCH] updated testes Signed-off-by: Prabod Rathnayaka --- .../nlp/annotators/cv/Phi3VisionTestSpec.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/scala/com/johnsnowlabs/nlp/annotators/cv/Phi3VisionTestSpec.scala b/src/test/scala/com/johnsnowlabs/nlp/annotators/cv/Phi3VisionTestSpec.scala index 08eb4e78d920f7..6f3e9b56b5f427 100644 --- a/src/test/scala/com/johnsnowlabs/nlp/annotators/cv/Phi3VisionTestSpec.scala +++ b/src/test/scala/com/johnsnowlabs/nlp/annotators/cv/Phi3VisionTestSpec.scala @@ -27,9 +27,9 @@ import org.scalatest.flatspec.AnyFlatSpec class Phi3VisionTestSpec extends AnyFlatSpec { - lazy val model = getBLIPForQuestionAnsweringPipelineModel + lazy val model = getPhi3VisionPipelineModel - "BLIP" should "answer a question for a given image" taggedAs SlowTest in { + "Phi3Vision" should "answer a question for a given image" taggedAs SlowTest in { val testDF = getTestDF val result = model.transform(testDF) @@ -152,7 +152,7 @@ class Phi3VisionTestSpec extends AnyFlatSpec { } - private def getBLIPForQuestionAnsweringPipelineModel = { + private def getPhi3VisionPipelineModel = { val testDF = getTestDF val imageAssembler: ImageAssembler = new ImageAssembler() @@ -163,6 +163,7 @@ class Phi3VisionTestSpec extends AnyFlatSpec { .pretrained() .setInputCols("image_assembler") .setOutputCol("answer") + .setMaxOutputLength(50) val newPipeline: Pipeline = new Pipeline().setStages(Array(imageAssembler, loadModel))