I think that your Java code is Ok, then try to change your Python script.
Please, would you be so kind to change the line print int(predictions[0])
with:
sys.stdout.write(str(predictions[0]))
sys.stdout.flush()
sys.stdout
will print data to console outputstream
and just for testing, put the absolute path of your script in the ProcessBuilder constructor:
String appDir = "C:\\my\\full\\path\\to\\script.py";
ProcessBuilder pb =
new ProcessBuilder("python", appDir);
Process p = pb.start();
....