Inference failed but code works locally

I am facing the same issue, with previously working code.