I got this error:
UnboundLocalError: local variable 'y_max' referenced before assignment
UnboundLocalError Traceback (most recent call last)
<ipython-input-4-c01841a65106> in <module>
1 #assign "-"=10
----> 2 data=load_images_from_folder("D:/Handwritten-Equation-Solver-master (1)/Handwritten-Equation-Solver-master/extracted_images/-")
3 len(data)
4 for i in range(0,len(data)):
5 data[i]=np.append(data[i],["10"])
<ipython-input-2-16a05bc6df7c> in load_images_from_folder(folder)
19 h_max=h
20 w_max=w
---> 21 im_crop=thresh[y_max:y_max+h_max+10,x_max:x_max+w_max+10]
22 im_resize=cv2.resize(im_crop,(28,28))
23 im_resize=np.reshape(im_resize,(784,1))