Skip to content

Commit 3cec178

Browse files
telpirionleahecole
authored andcommitted
fix: expand region tags to include import io (#418)
* fix: expand region tags to include `import io`
1 parent d2ae219 commit 3cec178

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

videointelligence/samples/analyze/analyze.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@
3232
"""
3333

3434
import argparse
35+
36+
# [START video_detect_text]
3537
import io
3638

3739
from google.cloud import videointelligence
40+
# [END video_detect_text]
3841

3942

4043
def analyze_explicit_content(path):
@@ -357,11 +360,10 @@ def video_detect_text_gcs(input_uri):
357360
# [END video_detect_text_gcs]
358361

359362

363+
# [START video_detect_text]
360364
def video_detect_text(path):
361-
# [START video_detect_text]
362-
"""Detect text in a local video."""
363-
from google.cloud import videointelligence
364365

366+
"""Detect text in a local video."""
365367
video_client = videointelligence.VideoIntelligenceServiceClient()
366368
features = [videointelligence.Feature.TEXT_DETECTION]
367369
video_context = videointelligence.VideoContext()
@@ -410,7 +412,7 @@ def video_detect_text(path):
410412
print("Rotated Bounding Box Vertices:")
411413
for vertex in frame.rotated_bounding_box.vertices:
412414
print("\tVertex.x: {}, Vertex.y: {}".format(vertex.x, vertex.y))
413-
# [END video_detect_text]
415+
# [END video_detect_text]
414416

415417

416418
def track_objects_gcs(gcs_uri):

0 commit comments

Comments
 (0)