Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -5,7 +5,7 @@ const session = require('express-session'); | ... | @@ -5,7 +5,7 @@ const session = require('express-session'); |
| 5 | const util = require('util'); | 5 | const util = require('util'); |
| 6 | const vision = require('@google-cloud/vision'); //google cloud vision api module | 6 | const vision = require('@google-cloud/vision'); //google cloud vision api module |
| 7 | const {Translate} = require('@google-cloud/translate').v2; | 7 | const {Translate} = require('@google-cloud/translate').v2; |
| 8 | -const credentials = require('/home/ubuntu/termproject/focused-clock-277615-3a427d503822.json'); | 8 | +const credentials = require(keyFilename); |
| 9 | const translate = new Translate({credentials}); | 9 | const translate = new Translate({credentials}); |
| 10 | const client = new vision.ImageAnnotatorClient( {credentials} ); | 10 | const client = new vision.ImageAnnotatorClient( {credentials} ); |
| 11 | const {Storage} = require('@google-cloud/storage'); //google cloud translate api storage api moudle | 11 | const {Storage} = require('@google-cloud/storage'); //google cloud translate api storage api moudle | ... | ... |
-
Please register or login to post a comment