Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.2 (#333)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent 310c508 commit 3292029
Show file tree
Hide file tree
Showing 102 changed files with 10,606 additions and 0 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,30 @@ async def predict(
- A row with column values matching the columns of the model,
up to 5MB. Not available for FORECASTING ``prediction_type``.
.. code-block::
from google.cloud import automl_v1
def sample_predict():
# Create a client
client = automl_v1.PredictionServiceClient()
# Initialize request argument(s)
payload = automl_v1.ExamplePayload()
payload.image.image_bytes = b'image_bytes_blob'
request = automl_v1.PredictRequest(
name="name_value",
payload=payload,
)
# Make the request
response = client.predict(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.automl_v1.types.PredictRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -401,6 +425,38 @@ async def batch_predict(
- AutoML Natural Language Sentiment Analysis
- AutoML Tables
.. code-block::
from google.cloud import automl_v1
def sample_batch_predict():
# Create a client
client = automl_v1.PredictionServiceClient()
# Initialize request argument(s)
input_config = automl_v1.BatchPredictInputConfig()
input_config.gcs_source.input_uris = ['input_uris_value_1', 'input_uris_value_2']
output_config = automl_v1.BatchPredictOutputConfig()
output_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"
request = automl_v1.BatchPredictRequest(
name="name_value",
input_config=input_config,
output_config=output_config,
)
# Make the request
operation = client.batch_predict(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.automl_v1.types.BatchPredictRequest, dict]):
The request object. Request message for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,31 @@ def predict(
- A row with column values matching the columns of the model,
up to 5MB. Not available for FORECASTING ``prediction_type``.
.. code-block::
from google.cloud import automl_v1
def sample_predict():
# Create a client
client = automl_v1.PredictionServiceClient()
# Initialize request argument(s)
payload = automl_v1.ExamplePayload()
payload.image.image_bytes = b'image_bytes_blob'
request = automl_v1.PredictRequest(
name="name_value",
payload=payload,
)
# Make the request
response = client.predict(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.automl_v1.types.PredictRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -599,6 +624,39 @@ def batch_predict(
- AutoML Natural Language Sentiment Analysis
- AutoML Tables
.. code-block::
from google.cloud import automl_v1
def sample_batch_predict():
# Create a client
client = automl_v1.PredictionServiceClient()
# Initialize request argument(s)
input_config = automl_v1.BatchPredictInputConfig()
input_config.gcs_source.input_uris = ['input_uris_value_1', 'input_uris_value_2']
output_config = automl_v1.BatchPredictOutputConfig()
output_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"
request = automl_v1.BatchPredictRequest(
name="name_value",
input_config=input_config,
output_config=output_config,
)
# Make the request
operation = client.batch_predict(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.automl_v1.types.BatchPredictRequest, dict]):
The request object. Request message for
Expand Down
Loading

0 comments on commit 3292029

Please sign in to comment.