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

feat: updates person detection samples for GA #86

Merged
merged 2 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START video_detect_person_beta]
# [START video_detect_person]
import io

from google.cloud import videointelligence_v1p3beta1 as videointelligence
from google.cloud import videointelligence_v1 as videointelligence


def detect_person(local_file_path="path/to/your/video-file.mp4"):
Expand Down Expand Up @@ -98,4 +98,4 @@ def detect_person(local_file_path="path/to/your/video-file.mp4"):
)


# [END video_detect_person_beta]
# [END video_detect_person]
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START video_detect_person_gcs_beta]
from google.cloud import videointelligence_v1p3beta1 as videointelligence
# [START video_detect_person_gcs]
from google.cloud import videointelligence_v1 as videointelligence


def detect_person(gcs_uri="gs://YOUR_BUCKET_ID/path/to/your/video.mp4"):
Expand Down Expand Up @@ -93,4 +93,4 @@ def detect_person(gcs_uri="gs://YOUR_BUCKET_ID/path/to/your/video.mp4"):
)


# [END video_detect_person_gcs_beta]
# [END video_detect_person_gcs]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import pytest

import video_detect_person_gcs_beta
import video_detect_person_gcs

RESOURCES = os.path.join(os.path.dirname(__file__), "resources")

Expand All @@ -25,7 +25,7 @@
def test_detect_person(capsys):
input_uri = "gs://cloud-samples-data/video/googlework_tiny.mp4"

video_detect_person_gcs_beta.detect_person(gcs_uri=input_uri)
video_detect_person_gcs.detect_person(gcs_uri=input_uri)

out, _ = capsys.readouterr()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import pytest

import video_detect_person_beta
import video_detect_person

RESOURCES = os.path.join(os.path.dirname(__file__), "resources")

Expand All @@ -25,7 +25,7 @@
def test_detect_person(capsys):
local_file_path = os.path.join(RESOURCES, "googlework_tiny.mp4")

video_detect_person_beta.detect_person(local_file_path=local_file_path)
video_detect_person.detect_person(local_file_path=local_file_path)

out, _ = capsys.readouterr()

Expand Down