8000 Fix vision sample · marcusjc/python-docs-samples@3b10a49 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b10a49

Browse files
author
Jon Wayne Parrott
committed
Fix vision sample
Change-Id: Ife238b0daf7f37227129a059a50c3c0155c5cf4f
1 parent d2b28e4 commit 3b10a49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vision/api/label/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def web_annotation(photo_file):
6767
'content': image_content.decode('UTF-8')
6868
},
6969
'features': [{
70-
'type': 'WEB_ANNOTATION',
70+
'type': 'WEB_DETECTION',
7171
'maxResults': 10
7272
}]
7373
}]

vision/api/label/snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_web_annotations(capsys, resource):
4242
snippets.web_annotation(resource('cat.jpg'))
4343
stdout, _ = capsys.readouterr()
4444
result = json.loads(stdout)
45-
web_annotation = result['responses'][0]['webAnnotation']
45+
web_annotation = result['responses'][0]['webDetection']
4646
web_entities = web_annotation['webEntities']
4747

4848
assert len(web_entities)

0 commit comments

Comments
 (0)
0