I have a machine learning API where I am doing predictions. It's working fine before introducing task_id. But after adding task_id I am getting response as null even though it's working properly but not returning the response
@app.get('/predict')
def predict(task_id,solute: str, solvent: str):
if task_id ==0:
results = predictions(solute, solvent)
response["interaction_map"] = (results[1].detach().numpy()).tolist()
response["predictions"] = results[0].item()
return {'result': response}
if task_id == 1:
return "this is second one"
