amazon.nova-pro-v1:0. You can use this to analyze images and get information about them.
Code
cookbook/models/aws/bedrock/image_agent.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
amazon.nova-pro-v1:0. You can use this to analyze images and get information about them.
from pathlib import Path
from agno.agent import Agent
from agno.media import Image
from agno.models.aws import AwsBedrock
from agno.tools.duckduckgo import DuckDuckGoTools
agent = Agent(
model=AwsBedrock(id="amazon.nova-pro-v1:0"),
tools=[DuckDuckGoTools()],
markdown=True,
)
image_path = Path(__file__).parent.joinpath("sample.jpg")
# Read the image file content as bytes
with open(image_path, "rb") as img_file:
image_bytes = img_file.read()
agent.print_response(
"Tell me about this image and give me the latest news about it.",
images=[
Image(content=image_bytes, format="jpeg"),
],
)
Create a virtual environment
Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Set your AWS Credentials
export AWS_ACCESS_KEY_ID=***
export AWS_SECRET_ACCESS_KEY=***
export AWS_REGION=***
Was this page helpful?