Skip to content

Commit

Permalink
updated testes
Browse files Browse the repository at this point in the history
Signed-off-by: Prabod Rathnayaka <[email protected]>
  • Loading branch information
prabod committed Oct 30, 2024
1 parent b2de629 commit 30364b2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -152,7 +152,7 @@ class Phi3VisionTestSpec extends AnyFlatSpec {

}

private def getBLIPForQuestionAnsweringPipelineModel = {
private def getPhi3VisionPipelineModel = {
val testDF = getTestDF

val imageAssembler: ImageAssembler = new ImageAssembler()
Expand All @@ -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))
Expand Down

0 comments on commit 30364b2

Please sign in to comment.