Skip to content

Commit

Permalink
Re-generate library using /synth.py (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot authored and JustinBeckwith committed Jul 25, 2018
1 parent 1e73872 commit 935adbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 6 additions & 6 deletions vision/samples/detect.v1p3beta1.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ function localizeObjects(fileName) {
* TODO(developer): Uncomment the following line before running the sample.
*/
// const fileName = `/path/to/localImage.png`;

const request = {
image: {content: fs.readFileSync(fileName)},
};

client
.objectLocalization(request)
.then(results => {
Expand All @@ -60,7 +60,7 @@ function localizeObjectsGCS(uri) {

// Creates a client
const client = new vision.ImageAnnotatorClient();

/**
* TODO(developer): Uncomment the following line before running the sample.
*/
Expand Down Expand Up @@ -98,7 +98,7 @@ function detectHandwritingOCR(fileName) {

const request = {
image: {
content: fs.readFileSync(fileName)
content: fs.readFileSync(fileName),
},
feature: {
languageHints: ['en-t-i0-handwrit'],
Expand All @@ -123,15 +123,15 @@ function detectHandwritingGCS(uri) {

// Creates a client
const client = new vision.ImageAnnotatorClient();

/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const uri = `gs://bucket/bucketImage.png`;

const request = {
image: {
content: fs.readFileSync(uri)
content: fs.readFileSync(uri),
},
feature: {
languageHints: ['en-t-i0-handwrit'],
Expand Down
4 changes: 1 addition & 3 deletions vision/samples/system-test/detect.v1p3beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ test(`should read handwriting in local handwritten.jpg sample`, async t => {
`${cmd} detectHandwriting ${files[1]}`,
cwd
);
t.true(
output.includes(`hand written message`)
);
t.true(output.includes(`hand written message`));
});

test(`should read handwriting from handwritten.jpg in GCS bucket`, async t => {
Expand Down

0 comments on commit 935adbd

Please sign in to comment.