Skip to content

Commit

Permalink
samples: fix region tag (#65)
Browse files Browse the repository at this point in the history
* samples: fix region tag

* fix: per reviewer

Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
  • Loading branch information
2 people authored and pattishin committed Nov 22, 2022
1 parent ab60269 commit 1e04d37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ai-platform/snippets/predict-text-sentiment-analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use strict';

async function main(text, endpointId, project, location = 'us-central1') {
// [START aiplatform_predict_text_entity_extraction]
// [START aiplatform_predict_text_sentiment_analysis]
/**
* TODO(developer): Uncomment these variables before running the sample.\
* (Not necessary if passing values as arguments)
Expand All @@ -44,7 +44,7 @@ async function main(text, endpointId, project, location = 'us-central1') {
// Instantiates a client
const predictionServiceClient = new PredictionServiceClient(clientOptions);

async function predictTextEntityExtraction() {
async function predictTextSentimentAnalysis() {
// Configure the endpoint resource
const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`;

Expand Down Expand Up @@ -73,8 +73,8 @@ async function main(text, endpointId, project, location = 'us-central1') {
console.log(`\tSentiment measure: ${predictionResult.sentiment}`);
}
}
predictTextEntityExtraction();
// [END aiplatform_predict_text_entity_extraction]
predictTextSentimentAnalysis();
// [END aiplatform_predict_text_sentiment_analysis]
}

process.on('unhandledRejection', err => {
Expand Down

0 comments on commit 1e04d37

Please sign in to comment.