Spaces:
Sleeping
Sleeping
Download check_models.py from Bhishaj/MerchFlow-AI: direct link, hf CLI and curl.
- Browser
- Download file 375 Bytes
-
https://huggingface.co/spaces/Bhishaj/MerchFlow-AI/resolve/main/check_models.py
- Command line
-
hf download hf://spaces/Bhishaj/MerchFlow-AI/check_models.py
-
curl -L -o check_models.py https://huggingface.co/spaces/Bhishaj/MerchFlow-AI/resolve/main/check_models.py
375 Bytes
| import google.generativeai as genai | |
| import os | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| api_key = os.getenv("GEMINI_API_KEY") | |
| if not api_key: | |
| print("No API key found") | |
| else: | |
| genai.configure(api_key=api_key) | |
| print("Listing models...") | |
| for m in genai.list_models(): | |
| if 'generateContent' in m.supported_generation_methods: | |
| print(m.name) | |