From 96fd0896b5584a6a4e9757d41b5797b9df0e5be3 Mon Sep 17 00:00:00 2001 From: Nirmal Fernando Date: Fri, 29 May 2015 10:39:56 +0530 Subject: [PATCH] Fix predict.jag with predict api change. --- modules/jaggeryapps/ml/site/predict/predict.jag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/jaggeryapps/ml/site/predict/predict.jag b/modules/jaggeryapps/ml/site/predict/predict.jag index aa99693c..755c2807 100644 --- a/modules/jaggeryapps/ml/site/predict/predict.jag +++ b/modules/jaggeryapps/ml/site/predict/predict.jag @@ -245,10 +245,11 @@ }); jsonData = JSON.stringify(inputArray); - + jsonData = "[".concat(jsonData, "]"); + $.ajax({ type: "POST", - url: serverUrl+"/api//models/"+modelId+"/predict", + url: serverUrl+"/api/models/"+modelId+"/predict", contentType: "application/json", data: jsonData, /*beforeSend : function(xhr) {