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

Commit

Permalink
feat: updates person detection samples for GA (#86)
Browse files Browse the repository at this point in the history
* feat: updates person detection samples for GA
  • Loading branch information
telpirion committed Dec 3, 2020
1 parent 17d84c2 commit 1a68219
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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]
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]
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
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

0 comments on commit 1a68219

Please sign in to comment.