title: Deploying Python ML model to NodeJS web app
body: <p>I trained a ML learning model using Python (sk-learn) that I want to host on the web so users can get predictions based on their input. So far, I managed to deploy it using Heroku in a simple NodeJS / Express web app. I am using a ChildProcess to trigger the Python process from Node. However, this is working rather slow (~5 seconds). I assume this is because the models have to be loaded again and again on every request.</p>
  <p>Is there anything I can do to improve this set-up while keeping Node in the stack?</p>
  <p>Or is it necessary to switch to something like Flask so everything is in Python and the models can just be loaded on start-up? (Which is what is advised here: <a href="https://stackoverflow.com/questions/42610590/sklearn-model-python-with-nodejs-express-how-to-connect-both">Sklearn Model (Python) with NodeJS (Express): how to connect both?</a>)</p>
  <p><strong>Update</strong>
  I switched to Flask which on the one hand solves the issue of reloading, but it also brought to light that my models (Random Forest) require too much memory to run comfortably on Heroku. Which is a new issue.</p>