From f4853dff041ec607ccee4396271a168365a9630c Mon Sep 17 00:00:00 2001 From: arithmetic1728 Date: Wed, 23 Sep 2020 22:58:51 -0700 Subject: [PATCH] tmp --- samples/snippets/detect/beta_snippets.py | 2 ++ samples/snippets/detect/detect.py | 2 ++ samples/snippets/product_search/product_search.py | 4 ++++ samples/snippets/product_search/product_set_management.py | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/samples/snippets/detect/beta_snippets.py b/samples/snippets/detect/beta_snippets.py index 1b0b6e6b..12b00b4f 100644 --- a/samples/snippets/detect/beta_snippets.py +++ b/samples/snippets/detect/beta_snippets.py @@ -347,6 +347,8 @@ def async_batch_annotate_images_uri(input_image_uri, output_uri): output = blob_list[0] json_string = output.download_as_string() + print("==sijun beta_snippets.py json_string") + print(json_string) response = json_format.Parse(json_string, vision.BatchAnnotateImagesResponse()) diff --git a/samples/snippets/detect/detect.py b/samples/snippets/detect/detect.py index 2f9ccdb8..a7336e2f 100644 --- a/samples/snippets/detect/detect.py +++ b/samples/snippets/detect/detect.py @@ -860,6 +860,8 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri): output = blob_list[0] json_string = output.download_as_string() + print("==sijun detect.py json_string") + print(json_string) response = json_format.Parse( json_string, vision.AnnotateFileResponse()) diff --git a/samples/snippets/product_search/product_search.py b/samples/snippets/product_search/product_search.py index 27834509..0b2940d4 100755 --- a/samples/snippets/product_search/product_search.py +++ b/samples/snippets/product_search/product_search.py @@ -76,6 +76,8 @@ def get_similar_products_file( image, image_context=image_context) index_time = response.product_search_results.index_time + print("==sijun product_search.py:79") + print(response.product_search_results) print('Product set index time: {}').format(index_time) results = response.product_search_results.results @@ -136,6 +138,8 @@ def get_similar_products_uri( image, image_context=image_context) index_time = response.product_search_results.index_time + print("==sijun product_search.py:141") + print(response.product_search_results) print('Product set index time: {}').format(index_time) results = response.product_search_results.results diff --git a/samples/snippets/product_search/product_set_management.py b/samples/snippets/product_search/product_set_management.py index 0286dea6..eef56d1d 100755 --- a/samples/snippets/product_search/product_set_management.py +++ b/samples/snippets/product_search/product_set_management.py @@ -82,6 +82,8 @@ def list_product_sets(project_id, location): # Display the product set information. for product_set in product_sets: + print("==sijun product_set_management.py:85") + print(product_set) print('Product set name: {}'.format(product_set.name)) print('Product set id: {}'.format(product_set.name.split('/')[-1])) print('Product set display name: {}'.format(product_set.display_name)) @@ -111,6 +113,8 @@ def get_product_set(project_id, location, product_set_id): print('Product set name: {}'.format(product_set.name)) print('Product set id: {}'.format(product_set.name.split('/')[-1])) print('Product set display name: {}'.format(product_set.display_name)) + print("==sijun product_set_management.py:116") + print(product_set) print('Product set index time: {}').format(product_set.index_time) # [END vision_product_search_get_product_set]