Spaces:
Sleeping
Sleeping
File size: 353 Bytes
35709fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import os
from google import genai
from dotenv import load_dotenv
load_dotenv()
client = genai.Client(api_key=os.getenv("GEMINI_API_KEY"))
try:
print("Listing available models:")
for m in client.models.list():
print(f"Model ID: {m.name}, Display Name: {m.display_name}")
except Exception as e:
print(f"Error listing models: {e}")
|