You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/playground/models/gpt4_v.py

16 lines
324 B

from swarms.models.gpt4v import GPT4Vision
api_key = ""
gpt4vision = GPT4Vision(
openai_api_key=api_key,
)
img = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/VFPt_Solenoid_correct2.svg/640px-VFPt_Solenoid_correct2.svg.png"
task = "What is this image"
answer = gpt4vision.run(task, img)
print(answer)