title: keras model import in Celery task
body: <p>I am trying to import a keras model using tensorflow backend in celery, but the model won't load, and nothing happens. Ｉread on other posts and tried to put import in the task function, but this still doesn't help.</p>
  
  <p>The code looks something like this:</p>
  
  <pre><code>@celery.task
  def predict():
      from keras.models import load_model
      model = load_model(filepath)
      result = model.predict(data)
      return result
  </code></pre>