在 JupyterLab 上使用以下代码来运行 Google Video Intelligence 包:
from google.cloud import videointelligence
import os
client = videointelligence.VideoIntelligenceServiceClient('VidIntelligence.JSON')
job = client.annotate_video(
input_uri='gs://vidintelligencebucket/The Simpsons - Monopoly Night.mp4',
features=['LABEL_DETECTION', 'SHOT_CHANGE_DETECTION'],
)
result = job.result()
当我运行它时,会出现以下错误:
AttributeError: 'str' object has no attribute 'annotate_video'
有什么建议么?