Spaces:
Sleeping
Sleeping
Download check_available_models.py from Darshanpurohit/StratoTest: direct link, hf CLI and curl.
- Browser
- Download file 249 Bytes
-
https://huggingface.co/spaces/Darshanpurohit/StratoTest/resolve/main/check_available_models.py
- Command line
-
hf download hf://spaces/Darshanpurohit/StratoTest/check_available_models.py
-
curl -L -o check_available_models.py https://huggingface.co/spaces/Darshanpurohit/StratoTest/resolve/main/check_available_models.py
249 Bytes
| from google import genai | |
| import os | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| api_key = os.getenv("GEMINI_API_KEY") | |
| client = genai.Client(api_key=api_key) | |
| print("\nAvailable Models:\n") | |
| for model in client.models.list(): | |
| print(model.name) |