communicate between python script on server side and javascript in the web-browser
I believe you need a simple API on the server which accept input from the client which can be done via JavaScript.
There are several technologies you could have a look at:

Ajax.
WebSockets.
I have a python script which resides on a web-server (running node.js) and does some machine learning computation. The data has to be supplied to the python script using javascript running in web-browser. How can this be done? I want to know the complete setup. For now, the server is the localhost only.