Skip to content

Commit

Permalink
docs: update async_detect_document() sample (#260)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
2 people authored and dandhlee committed Nov 15, 2022
1 parent 5669a49 commit 7ec1b83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vision/snippets/detect/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,9 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):

bucket = storage_client.get_bucket(bucket_name)

# List objects with the given prefix.
blob_list = list(bucket.list_blobs(prefix=prefix))
# List objects with the given prefix, filtering out folders.
blob_list = [blob for blob in list(bucket.list_blobs(
prefix=prefix)) if not blob.name.endswith('/')]
print('Output files:')
for blob in blob_list:
print(blob.name)
Expand Down

0 comments on commit 7ec1b83

Please sign in to comment.