Skip to content

Commit 0f325b3

Browse files
authored
Vision - remove unused region tags [(#1620)](GoogleCloudPlatform/python-docs-samples#1620)
1 parent 73e6e7b commit 0f325b3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

samples/snippets/detect/detect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def detect_web_uri(uri):
479479
# [START vision_web_entities_include_geo_results]
480480
def web_entities_include_geo_results(path):
481481
"""Detects web annotations given an image, using the geotag metadata
482-
in the iamge to detect web entities."""
482+
in the image to detect web entities."""
483483
client = vision.ImageAnnotatorClient()
484484

485485
with io.open(path, 'rb') as image_file:
@@ -503,7 +503,7 @@ def web_entities_include_geo_results(path):
503503
# [START vision_web_entities_include_geo_results_uri]
504504
def web_entities_include_geo_results_uri(uri):
505505
"""Detects web annotations given an image in the file located in
506-
Google Cloud Storage., using the geotag metadata in the iamge to
506+
Google Cloud Storage., using the geotag metadata in the image to
507507
detect web entities."""
508508
client = vision.ImageAnnotatorClient()
509509

samples/snippets/document_text/doctext.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class FeatureType(Enum):
4141

4242
def draw_boxes(image, bounds, color):
4343
"""Draw a border around the image using the hints in the vector list."""
44-
# [START draw_blocks]
4544
draw = ImageDraw.Draw(image)
4645

4746
for bound in bounds:
@@ -51,7 +50,6 @@ def draw_boxes(image, bounds, color):
5150
bound.vertices[2].x, bound.vertices[2].y,
5251
bound.vertices[3].x, bound.vertices[3].y], None, color)
5352
return image
54-
# [END draw_blocks]
5553

5654

5755
def get_document_bounds(image_file, feature):
@@ -96,7 +94,6 @@ def get_document_bounds(image_file, feature):
9694

9795

9896
def render_doc_text(filein, fileout):
99-
# [START render_doc_text]
10097
image = Image.open(filein)
10198
bounds = get_document_bounds(filein, FeatureType.PAGE)
10299
draw_boxes(image, bounds, 'blue')
@@ -109,7 +106,6 @@ def render_doc_text(filein, fileout):
109106
image.save(fileout)
110107
else:
111108
image.show()
112-
# [END render_doc_text]
113109

114110

115111
if __name__ == '__main__':

0 commit comments

Comments
 (0)