Download debug_2_flash.py from rzvn1/TRIEM_AI: direct link, hf CLI and curl.
- Browser
- Download file 402 Bytes
-
https://huggingface.co/spaces/rzvn1/TRIEM_AI/resolve/main/debug_2_flash.py
- Command line
-
hf download hf://spaces/rzvn1/TRIEM_AI/debug_2_flash.py
-
curl -L -o debug_2_flash.py https://huggingface.co/spaces/rzvn1/TRIEM_AI/resolve/main/debug_2_flash.py
402 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) | |
| print("Testing gemini-2.0-flash...") | |
| try: | |
| response = client.models.generate_content( | |
| model="gemini-2.0-flash", | |
| contents="Hello" | |
| ) | |
| print(f"Success: {response.text}") | |
| except Exception as e: | |
| print(f"Failed: {e}") | |