-
-
Save rohithBirdeye/c4182ebe44a04d47b62ac5e293878a85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getLeadScore(String leadJson) throws Exception { | |
try { | |
if(StringUtils.isBlank(leadJson)) | |
return null; | |
String leadObj = "\'"+ leadJson + "\'"; | |
String[] command = { pythonPath, pythonScriptPath + "/interp.py", "score", | |
pythonScriptPath + "/leadmodel",leadObj}; | |
logger.info(leadgenMarker, "command str {}", Arrays.toString(command)); | |
System.out.println(Arrays.toString(command)); | |
Process p = Runtime.getRuntime().exec(command); | |
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); | |
String leadScore = in.readLine(); | |
return leadScore; | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
return null; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment