| 295 | return language |
| 296 | |
| 297 | def init_ucaip(): |
| 298 | from google.cloud import aiplatform |
| 299 | if not is_user_secrets_token_set(): |
| 300 | return |
| 301 | |
| 302 | from kaggle_gcp import get_integrations |
| 303 | if not get_integrations().has_cloudai(): |
| 304 | return |
| 305 | |
| 306 | from kaggle_secrets import GcpTarget |
| 307 | from kaggle_gcp import KaggleKernelCredentials |
| 308 | kaggle_kernel_credentials = KaggleKernelCredentials(target=GcpTarget.CLOUDAI) |
| 309 | |
| 310 | # Patch the ucaip init method, this flows down to all ucaip services |
| 311 | monkeypatch_aiplatform_init(aiplatform, kaggle_kernel_credentials) |
| 312 | |
| 313 | def init_video_intelligence(): |
| 314 | from google.cloud import videointelligence |