如何使用 python 部署 Google Cloud NLP

How to deploy Google Cloud NLP with python

我使用 GCP 的自动机器学习系统训练了我的模型,并准备使用 Python 部署它。在Google提供的示例代码中,他们导入了几个库:

import sys

from google.api_core.client_options import ClientOptions
from google.cloud import automl_v1
from google.cloud.automl_v1.proto import service_pb2

而且我找不到可以从哪里获得这些库。如有任何帮助,我们将不胜感激!

他们正在引用 AutoML 的 official Python Client Library。您可以通过以下方式下载并安装它:

Mac

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-automl

Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-automl