google-prediction

Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ “error” : “invalid_grant” }

这一生的挚爱 提交于 2019-12-02 01:57:00
问题 I have a Prediction app that's based on Google-api-php client version 1.0.0 latest. it's perfectly working in the localhost environment. but when I deploy same exact app into the hosting server environment it's gave me following issue. THIS IS THE ERROR I GOT FROM HOSTING ENVIRONMENT Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /home/predict/public_html/predict/Google/Auth/OAuth2.php:335

Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ “error” : “invalid_grant” }

北战南征 提交于 2019-12-01 20:16:38
I have a Prediction app that's based on Google-api-php client version 1.0.0 latest. it's perfectly working in the localhost environment. but when I deploy same exact app into the hosting server environment it's gave me following issue. THIS IS THE ERROR I GOT FROM HOSTING ENVIRONMENT Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /home/predict/public_html/predict/Google/Auth/OAuth2.php:335 Stack trace: #0 /home/predict/public_html/predict/Google/Auth/OAuth2.php(294): Google_Auth_OAuth2-

Error while executing Google Prediction API Command line Sample

点点圈 提交于 2019-12-01 10:42:52
I have downloaded the sample command line program for prediction api and imported in eclipse as mention here . I have imported that sample program and replaced the content of client_secrets.json with values of file which i downloaded from api console as mentioned in the above link . I have built the model using standalone explorer . But prediction i want to do through my java code . So below I have mentioned the code . package com.google.api.services.samples.prediction.cmdline; import com.google.api.client.auth.oauth2.Credential; import com.google.api.client.extensions.java6.auth.oauth2

Long running program in Google App Engine

爷,独闯天下 提交于 2019-12-01 08:29:25
I have written a servlet code in Java for reading a line from file which is stored in Google Cloud Storage . Once I read each line I pass it to prediction API . Once i get the prediction of the text passed . I append it to original line and store it in some other file in Google cloud storage . This sources file is a csv and has more than 10,000 records . Since I am parsing it individually,passing it to prediction API and then storing back to Cloud Storage . It takes lot of time to do so . Since App Engine has limit of 30 section and also task queues has limitation . Can any suggest me some

Error while executing Google Prediction API Command line Sample

大憨熊 提交于 2019-12-01 08:16:00
问题 I have downloaded the sample command line program for prediction api and imported in eclipse as mention here . I have imported that sample program and replaced the content of client_secrets.json with values of file which i downloaded from api console as mentioned in the above link . I have built the model using standalone explorer . But prediction i want to do through my java code . So below I have mentioned the code . package com.google.api.services.samples.prediction.cmdline; import com

Getting error on ML-Engine predict but local predict works fine

喜夏-厌秋 提交于 2019-11-29 12:01:44
I have searched a lot here but unfortunately could not find an answer. I am running TensorFlow 1.3 (installed via PiP on MacOS) on my local machine, and have created a model using the provided " ssd_mobilenet_v1_coco " checkpoints. I managed to train locally and on the ML-Engine (Runtime 1.2), and successfully deployed my savedModel to the ML-Engine. Local predictions (below code) work fine and I get the model results gcloud ml-engine local predict --model-dir=... --json-instances=request.json FILE request.json: {"inputs": [[[242, 240, 239], [242, 240, 239], [242, 240, 239], [242, 240, 239],

Getting a PrivateKey object from a .p12 file in Java

扶醉桌前 提交于 2019-11-28 06:18:46
As the title suggests, I have .p12 file required for google service account api access. In order to get the credential to connect to the api, there's a field .setServiceAccountPrivateKey(PrivateKey privateKey). So, what's the easiest way in which I can do this? I have a resources folder which is in my classpath so if I add the p12 file there, I can get the resource from getClass().getResource() as either an inputStream or a URL. I've tried the URL method but it doesn't work (I get a "URI is not hierarchical" error trying to create a File object from URL.toURI()). You can load your .p12 file

Getting a PrivateKey object from a .p12 file in Java

萝らか妹 提交于 2019-11-27 05:39:23
问题 As the title suggests, I have .p12 file required for google service account api access. In order to get the credential to connect to the api, there's a field .setServiceAccountPrivateKey(PrivateKey privateKey). So, what's the easiest way in which I can do this? I have a resources folder which is in my classpath so if I add the p12 file there, I can get the resource from getClass().getResource() as either an inputStream or a URL. I've tried the URL method but it doesn't work (I get a "URI is