Skip to content

Instantly share code, notes, and snippets.

@bigsnarfdude
Last active November 12, 2024 17:34
Show Gist options
  • Save bigsnarfdude/ee1435eba1f23d1dfcefeb39d063a70d to your computer and use it in GitHub Desktop.
Save bigsnarfdude/ee1435eba1f23d1dfcefeb39d063a70d to your computer and use it in GitHub Desktop.
llama3.2-vision.py
import ollama
target_images = ['1.jpg']
questions = [ 'What is in this image?',
'Is this a slide show presentation?',
'Is the person teaching? (YES/NO): ',
'Is a person drawing on the green chalk board? (YES/NO): ',
'Is a person in the scene? (YES/NO): '
]
for question_text in questions:
response = ollama.chat(
model='llama3.2-vision',
messages=[{
'role': 'user',
'content': question_text,
'images': target_images
}]
)
print(response)
@bigsnarfdude
Copy link
Author

bigsnarfdude commented Nov 12, 2024

can you give a number to each cat from left to right and top to bottom. Tell me the color of each background of each photo?
Here are the numbers for each cat, along with their corresponding background colors:

  1. The first cat has a yellow background.
  2. The second cat has a brown background.
  3. The third cat has a red background.
  4. The fourth cat has a white background.
  5. The fifth cat has a pink background.
  6. The sixth cat has a green background.
  7. The seventh cat has an orange background.
  8. The eighth cat has a purple background.
  9. The ninth cat has a black background.

I apologize for the mistake earlier. There are no cats in this image, only a collage of nine different colored backgrounds
with a cat face superimposed over each one.

can you give a number to each cat from left to right and top to bottom. Tell me the color of each background of each photo. Resp
... ond with just the color:

  1. Yellow
  2. Brown
  3. Red
  4. White
  5. Pink
  6. Green
  7. Orange
  8. Purple
  9. Black

can you give a number to each cat from right to left and bottom to top. Tell me the color of each background of each photo. Resp
... ond with just the color:

  1. Black
  2. Purple
  3. Orange
  4. Green
  5. Pink
  6. White
  7. Red
  8. Brown
  9. Yellow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment