title: How do I load a file on initialization in a flask application
body: <p>I have a big file, let's call it machine_learning_model.hdf5. I am loading it into my application every time a post request endpoint is hit. The pseudocode looks like this:</p>
  
  <pre><code>def post(self):
    model = load_model('./machine_learning_model.hdf5')
    return( model.predict())
  </code></pre>
  
  <p>However the fact that I am loading the file every time the endpoint is hit causing problems. In general, what is the proper way to load a big file into a flask application on initialization so the individual endpoints can use the code from said file. </p>