Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b10a49

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

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎vision/api/label/snippets.py

Copy file name to clipboardExpand all lines: vision/api/label/snippets.py
+1-1Lines 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

Copy file name to clipboardExpand all lines: vision/api/label/snippets_test.py
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.