google-prediction

Can Google Prediction API be used to develop Predictive Chat Bot?

无人久伴 提交于 2021-01-29 07:46:45
问题 I was just fiddling around different machine learning platforms and was planing to use Google predictive API for creating predictive chat bot. The issue that I am facing now is each request to the API requires OAuth authentication. The fact that I will not be able to authenticate requests for processing the text entered by a client is the real concern. How will I probably respond to a text entered in the chat by a guest user in real time? Is it possible or is Google predictive API not made

Understanding inputs for google ai platform custom prediction routines

◇◆丶佛笑我妖孽 提交于 2020-01-15 03:40:07
问题 I am following this documentation on custom prediction routines and I am trying to understand how the inputs for custom prediction routine looks like. The code to send the input looks like this: instances = [ [6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2], ] service = discovery.build('ml', 'v1') name = 'projects/{}/models/{}'.format(project, model) if version is not None: name += '/versions/{}'.format(version) response = service.projects().predict( name=name, body={'instances': instances} )

continuous call of Google Prediction API gives response 'Undefined'

放肆的年华 提交于 2020-01-05 04:04:27
问题 In my application I have been calling google prediction API continuously for an array(size: 4000 aprox) of strings. I observed that after some api calls it starts giving response as Undefined , it continues for some time and then gives result fine. This is happening frequently. I have checked their api documentation, but couldn't find any rate limit or any such restriction. Also there was no error logged in Google API manager dashboard. Does anyone have any idea why its happening like that.

ML Engine Online Prediction - Unexpected tensor name: values

吃可爱长大的小学妹 提交于 2019-12-24 11:15:43
问题 I get the following error when trying to make an online prediction on my ML Engine model. The key "values" is not correct. (See error on image.) enter image description here I already tested with RAW image data : {"image_bytes":{"b64": base64.b64encode(jpeg_data)}} & Converted the data to a numpy array. Currently I have the following code: from googleapiclient import discovery import base64 import os from PIL import Image import json import numpy as np os.environ["GOOGLE_APPLICATION

Long running program in Google App Engine

蹲街弑〆低调 提交于 2019-12-19 09:24:11
问题 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 .

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

天涯浪子 提交于 2019-12-18 07:02:56
问题 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

Redirect Bigquery Data to Prediction

南楼画角 提交于 2019-12-12 03:55:25
问题 We are developing a POC in Google's Spreadsheets. There are some configurations, but in a nutshell it downloads data from BigQuery and redirects it to Prediction. Our Bigquery tables have over to 41Mb, with is not allowed/supported by Spreadsheets. We thought in download packages of 5Mb of data from Bigquery. Although Predicition API provides methods for insert lots of data, the update method allows to upload only one line/instance. Is there any way to redirect Bigquery data straight to

Google Prediction API, Hello Prediction: error - Too few arguments

跟風遠走 提交于 2019-12-11 23:17:37
问题 Today is my first day trying out Google Prediction API on Anaconda Python (Ubuntu Linux). I wanted to try out the Hello Prediction starter code prediction.py using the following: $ python prediction.py --object_name="mymodelid/mybucket" --id="myidentifier" exactly how it is advised in the code documentation. However, I am getting the following error: usage: pred.py [-h] [--auth_host_name AUTH_HOST_NAME] [--noauth_local_webserver] [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]] [-

Export a custom Keras model to be used for prediction with the Cloud ML Engine

走远了吗. 提交于 2019-12-06 15:07:58
问题 I have difficulties exporting a custom VGG-Net (not exactly the one from Keras), that was trained with Keras, so that it can be used for the Google Cloud Predict API. I am loading my model with Keras. sess = tf.Session() K.set_session(sess) model = load_model(model.h5) The image that I want to classify was encoded as base64 string. So, I will have to decode it for the prediction task with some code that I found in one of the google examples. channels = 3 height = 96 width = 96 def decode_and

Export a custom Keras model to be used for prediction with the Cloud ML Engine

懵懂的女人 提交于 2019-12-04 20:44:49
I have difficulties exporting a custom VGG-Net (not exactly the one from Keras), that was trained with Keras, so that it can be used for the Google Cloud Predict API. I am loading my model with Keras. sess = tf.Session() K.set_session(sess) model = load_model(model.h5) The image that I want to classify was encoded as base64 string. So, I will have to decode it for the prediction task with some code that I found in one of the google examples. channels = 3 height = 96 width = 96 def decode_and_resize(image_str_tensor): """Decodes jpeg string, resizes it and returns a uint8 tensor.""" image = tf