Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changes positional to named pararameters in Video samples #4017

Merged
merged 3 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions video/cloud-client/analyze/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def analyze_explicit_content(path):
video_client = videointelligence.VideoIntelligenceServiceClient()
features = [videointelligence.enums.Feature.EXPLICIT_CONTENT_DETECTION]

operation = video_client.annotate_video(path, features=features)
operation = video_client.annotate_video(input_uri=path, features=features)
print("\nProcessing video for explicit content annotations:")

result = operation.result(timeout=90)
Expand All @@ -70,7 +70,7 @@ def analyze_labels(path):
context = videointelligence.types.VideoContext(label_detection_config=config)

operation = video_client.annotate_video(
path, features=features, video_context=context
input_uri=path, features=features, video_context=context
)
print("\nProcessing video for label annotations:")

Expand Down Expand Up @@ -233,7 +233,7 @@ def analyze_shots(path):
""" Detects camera shot changes. """
video_client = videointelligence.VideoIntelligenceServiceClient()
features = [videointelligence.enums.Feature.SHOT_CHANGE_DETECTION]
operation = video_client.annotate_video(path, features=features)
operation = video_client.annotate_video(input_uri=path, features=features)
print("\nProcessing video for shot change annotations:")

result = operation.result(timeout=90)
Expand Down Expand Up @@ -263,7 +263,7 @@ def speech_transcription(path):
)

operation = video_client.annotate_video(
path, features=features, video_context=video_context
input_uri=path, features=features, video_context=video_context
)

print("\nProcessing video for speech transcription.")
Expand Down
2 changes: 1 addition & 1 deletion video/cloud-client/labels/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def analyze_labels(path):
# [START video_label_tutorial_construct_request]
video_client = videointelligence.VideoIntelligenceServiceClient()
features = [videointelligence.enums.Feature.LABEL_DETECTION]
operation = video_client.annotate_video(path, features=features)
operation = video_client.annotate_video(input_uri=path, features=features)
# [END video_label_tutorial_construct_request]
print('\nProcessing video for label annotations:')

Expand Down
2 changes: 1 addition & 1 deletion video/cloud-client/shotchange/shotchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def analyze_shots(path):
# [START video_shot_tutorial_construct_request]
video_client = videointelligence.VideoIntelligenceServiceClient()
features = [videointelligence.enums.Feature.SHOT_CHANGE_DETECTION]
operation = video_client.annotate_video(path, features=features)
operation = video_client.annotate_video(input_uri=path, features=features)
# [END video_shot_tutorial_construct_request]
print('\nProcessing video for shot change annotations:')

Expand Down