MCPcopy Index your code
hub / github.com/Kaggle/docker-python / init_vision

Function init_vision

patches/kaggle_gcp.py:332–345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

330 return videointelligence
331
332def init_vision():
333 from google.cloud import vision
334 if not is_user_secrets_token_set():
335 return vision
336
337 from kaggle_gcp import get_integrations
338 if not get_integrations().has_cloudai():
339 return vision
340
341 from kaggle_secrets import GcpTarget
342 kernel_credentials = KaggleKernelCredentials(target=GcpTarget.CLOUDAI)
343 monkeypatch_client(vision.ImageAnnotatorClient, kernel_credentials)
344 monkeypatch_client(vision.ImageAnnotatorAsyncClient, kernel_credentials)
345 return vision
346
347def init():
348 init_bigquery()

Callers 5

initFunction · 0.85

Calls 5

get_integrationsFunction · 0.90
monkeypatch_clientFunction · 0.85
has_cloudaiMethod · 0.80