Skip to content

Commit 38db343

Browse files
authored
Revert "Update detect.py (#2174)"
This reverts commit 0c0c1ed.
1 parent 6a71c74 commit 38db343

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vision/cloud-client/detect/detect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):
704704
bucket_name = match.group(1)
705705
prefix = match.group(2)
706706

707-
bucket = storage_client.get_bucket(bucket_name)
707+
bucket = storage_client.get_bucket(bucket_name=bucket_name)
708708

709709
# List objects with the given prefix.
710710
blob_list = list(bucket.list_blobs(prefix=prefix))
@@ -715,7 +715,7 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):
715715
# Process the first output file from GCS.
716716
# Since we specified batch_size=2, the first response contains
717717
# the first two pages of the input file.
718-
output = blob_list[1]
718+
output = blob_list[0]
719719

720720
json_string = output.download_as_string()
721721
response = json_format.Parse(

0 commit comments

Comments
 (0)