Download debug_list_v2_simple.py from rzvn1/TRIEM_AI: direct link, hf CLI and curl.
- Browser
- Download file 371 Bytes
-
https://huggingface.co/spaces/rzvn1/TRIEM_AI/resolve/main/debug_list_v2_simple.py
- Command line
-
hf download hf://spaces/rzvn1/TRIEM_AI/debug_list_v2_simple.py
-
curl -L -o debug_list_v2_simple.py https://huggingface.co/spaces/rzvn1/TRIEM_AI/resolve/main/debug_list_v2_simple.py
371 Bytes
| import os | |
| from dotenv import load_dotenv | |
| from google import genai | |
| load_dotenv() | |
| api_key = os.getenv("GEMINI_API_KEY") | |
| client = genai.Client(api_key=api_key) | |
| try: | |
| print("Listing models...") | |
| for model in client.models.list(): | |
| print(f"Model ID: {model.name}") | |
| # print(f"Object: {model}") | |
| except Exception as e: | |
| print(f"Error listing: {e}") | |