Skip to content

Commit

Permalink
fix test bug in srt_llava_next_test.py (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
bingwork authored May 24, 2024
1 parent 0fafc56 commit 3167d8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/usage/llava/srt_llava_next_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ def image_qa(s, image, question):

def single():
image_url = "https://farm4.staticflickr.com/3175/2653711032_804ff86d81_z.jpg"
pil_image = load_image(image_url)
pil_image, _ = load_image(image_url)
state = image_qa.run(image=pil_image, question="What is this?", max_new_tokens=512)
print(state["answer"], "\n")


def stream():
image_url = "https://farm4.staticflickr.com/3175/2653711032_804ff86d81_z.jpg"
pil_image = load_image(image_url)
pil_image, _ = load_image(image_url)
state = image_qa.run(
image=pil_image,
question="Please generate short caption for this image.",
Expand All @@ -40,7 +40,7 @@ def stream():

def batch():
image_url = "https://farm4.staticflickr.com/3175/2653711032_804ff86d81_z.jpg"
pil_image = load_image(image_url)
pil_image, _ = load_image(image_url)
states = image_qa.run_batch(
[
{"image": pil_image, "question": "What is this?"},
Expand Down

0 comments on commit 3167d8d

Please sign in to comment.