Skip to content

Commit

Permalink
fix: expand region tags to include import io (#418)
Browse files Browse the repository at this point in the history
* fix: expand region tags to include `import io`
  • Loading branch information
telpirion authored and leahecole committed Sep 15, 2023
1 parent d2ae219 commit 3cec178
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions videointelligence/samples/analyze/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@
"""

import argparse

# [START video_detect_text]
import io

from google.cloud import videointelligence
# [END video_detect_text]


def analyze_explicit_content(path):
Expand Down Expand Up @@ -357,11 +360,10 @@ def video_detect_text_gcs(input_uri):
# [END video_detect_text_gcs]


# [START video_detect_text]
def video_detect_text(path):
# [START video_detect_text]
"""Detect text in a local video."""
from google.cloud import videointelligence

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


def track_objects_gcs(gcs_uri):
Expand Down

0 comments on commit 3cec178

Please sign in to comment.