Skip to content

Commit 58c697a

Browse files
dizcologybusunkim96
authored andcommitted
move region tags so that the beta page only include codes from the relevant file
1 parent 01ff509 commit 58c697a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

language/snippets/cloud-client/v1beta2/quickstart.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@
1818
def run_quickstart():
1919
# [START language_quickstart]
2020
# Imports the Google Cloud client library
21-
# [START beta_import_client]
22-
# [START beta_import]
2321
from google.cloud import language_v1beta2
2422
from google.cloud.language_v1beta2 import enums
2523
from google.cloud.language_v1beta2 import types
26-
# [END beta_import]
2724

2825
# Instantiates a client with the v1beta2 version
2926
client = language_v1beta2.LanguageServiceClient()
30-
# [END beta_import_client]
3127

3228
# The text to analyze
3329
text = u'Hallo Welt!'

language/snippets/cloud-client/v1beta2/snippets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
import argparse
2525
import sys
2626

27+
# [START beta_import]
2728
from google.cloud import language_v1beta2
2829
from google.cloud.language_v1beta2 import enums
2930
from google.cloud.language_v1beta2 import types
31+
# [END beta_import]
3032
import six
3133

3234

@@ -166,7 +168,9 @@ def syntax_file(gcs_uri):
166168
# [START def_entity_sentiment_text]
167169
def entity_sentiment_text(text):
168170
"""Detects entity sentiment in the provided text."""
171+
# [START beta_client]
169172
client = language_v1beta2.LanguageServiceClient()
173+
# [END beta_client]
170174

171175
if isinstance(text, six.binary_type):
172176
text = text.decode('utf-8')

0 commit comments

Comments
 (0)