this is my code
and I am getting this error
can anyone please help me??
Hello @itsme_yashu5, welcome to the community!
According to the API Reference examples you would need to read the uploaded file variable to convert it to bytes, which then Image.load_img should gladily accept 
I didn’t try yet on my side, but could
if image_file is not None:
image_data = image_file.read()
img = Image.load_img(image_data)
...
do the trick?
Best,
Fanilo
img = Image.load_img(image_data)
returns an Attribute error: module ‘PIL.Image’ has no attribute ‘load_img’ 