Skip to content

Commit

Permalink
updated testes
Browse files Browse the repository at this point in the history
Signed-off-by: Prabod Rathnayaka <prabod@rathnayaka.me>
  • Loading branch information
prabod committed Nov 8, 2024
1 parent bfaf0ec commit f7e6d2d
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 f7e6d2d

Please sign in to comment.