Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

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 May 10, 2023
1 parent 13fa7ca commit 4ff158d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions 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 4ff158d

Please sign in to comment.