Lr_model' is not defined

I doubt anyone could figure this out without seeing the complete notebook and all the associated files. Also note as a general matter that we’re not supposed to share solution code in a public way on the forums. The first question is where lr_model should be defined. Look for the cells in the notebook that contain “import” commands. Did you modify any of them? E.g. perhaps accidentally turn them from code cells into “markdown” (documentation) cells. If the import commands look correct, then maybe one of the accompanying files in your assignment was not correctly initialized or has been modified. You can click “File → Open” and then check the contents of any utility “dot py” files that are part of the assignment. Here’s a thread about how to get clean copies of the notebook and the rest of the files in the assignment (read all the way to the end of the article).