The code seems correct but I don’t think you can fit an exponential plus a second order polynomial the data above in the full range. You might need to fit in a restricted range or need to perform separate fits in separate ranges or build a function representing better your model, e.g. using a gamma or a log-normal distribution ?