title: problem adding worker and unable to return the respose while using celery
body: <p>I am having a fast API that does ml predictions and uses celery for task queue.</p>
  <p><code>prediction</code> code</p>
  <pre class="lang-py prettyprint-override"><code>response = {}
  async def predictions(solute, solvent):
        m = Chem.MolFromSmiles(solute,sanitize=False)
        n = Chem.MolFromSmiles(solvent,sanitize=False)
        mol = Chem.MolFromSmiles(solute)
        solute = Chem.MolToSmiles(mol)
        mol = Chem.MolFromSmiles(solvent)
        solvent = Chem.MolToSmiles(mol)
        interaction_map_one = torch.trunc(interaction_map)
        response[&quot;interaction_map&quot;] = (interaction_map_one.detach().numpy()).tolist()
        response[&quot;predictions&quot;] = delta_g.item()
  </code></pre>
  <p>and my function in <code>worker.py</code></p>
  <pre class="lang-py prettyprint-override"><code>from model.model import predictions, response
  @celery.task(name='predictions')
  def predictions(solute, solvent):
      return {'result': response}
  </code></pre>
  <p>and <code>main.py</code> where i create the celery task</p>
  <pre class="lang-py prettyprint-override"><code>@app.get(api_names[0])
  async def predict(solute,solvent):
      task = predictions.delay(solute,solvent)
      return JSONResponse({'task_id': task.id})
  </code></pre>
  <p>Actually, I am migrating from fast API background tasks to celery and facing problems with returning responses. When I am running it is giving an empty dictionary celery which means it's not running the <code>prediction</code>. But I don't know where I am doing wrong. If you can check the below picture you will understand what I am saying.</p>
  <p>I am guessing I have done some wrong in the <code>worker.py</code> but not sure what it is.</p>
  <p>I have tried using but still I am getting empty dictionary.</p>
  <pre class="lang-py prettyprint-override"><code>from model.model import predictions, response
  @celery.task(name='predictions')
  def create_task(solute, solvent):
      predictions(solute, solvent)
      return {'result': response}
  </code></pre>
  <p><img src="https://i.stack.imgur.com/CmzrE.png" alt="Output image from flower dashboard" /></p>