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/gemini_example.py

19 lines
375 B

import os
from dotenv import load_dotenv
from swarms.models.gemini import Gemini
load_dotenv()
api_key = os.environ["GEMINI_API_KEY"]
# Initialize the model
model = Gemini(gemini_api_key=api_key)
# Establish the prompt and image
task = "What is your name"
img = "images/github-banner-swarms.png"
# Run the model
out = model.run("What is your name?", img=img)
print(out)