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.
18 lines
405 B
18 lines
405 B
11 months ago
|
from swarms import GPT4VisionAPI
|
||
|
|
||
|
# Initialize with default API key and custom max_tokens
|
||
|
api = GPT4VisionAPI(max_tokens=1000)
|
||
|
|
||
|
# Define the task and image URL
|
||
|
task = "Describe the scene in the image."
|
||
10 months ago
|
img = (
|
||
|
"/home/kye/.swarms/swarms/examples/Screenshot from 2024-02-20"
|
||
|
" 05-55-34.png"
|
||
|
)
|
||
11 months ago
|
|
||
|
# Run the GPT-4 Vision model
|
||
|
response = api.run(task, img)
|
||
|
|
||
|
# Print the model's response
|
||
|
print(response)
|