Error in HomeWork 4 --> train_happy_sad_model

Ramzis_Akhmitzyanov

17m

################### C1W4 Here I preprocess the data about happy/sad:

from tensorflow.keras.preprocessing.image import ImageDataGenerator
import zipfile
from os import path, getcwd, chdir

!wget --no-check-certificate \ “https://storage.googleapis.com/laurencemoroney-blog.appspot.com/happy-or-sad.zip”
-O “/tmp/happy-or-sad.zip”

zip_ref = zipfile.ZipFile("/tmp/happy-or-sad.zip", ‘r’)
zip_ref.extractall("/tmp/h-or-s")
zip_ref.close()

GRADED FUNCTION: image_generator

def image_generator():

START CODE HERE

train_datagen = ImageDataGenerator(rescale=1/255)

 
train_generator = train_datagen.flow_from_directory(
    '/tmp/h-or-s',  
    target_size=(150, 150), 
    batch_size=10,
    class_mode='binary')

### END CODE HERE

return train_generator

####################
##################running it I got also

Proxy request sent, awaiting response… 200 OK
Length: 2670333 (2.5M) [application/zip]
Saving to: ‘/tmp/happy-or-sad.zip’

/tmp/happy-or-sad.z 100%[===================>] 2.55M --.-KB/s in 0.02s

2022-06-08 00:21:39 (139 MB/s) - ‘/tmp/happy-or-sad.zip’ saved [2670333/2670333]

########And everything else works good. Trying to submit i get 0, both part of evaluation say

!!!There was a problem compiling the code from your notebook. Details:
[Errno 2] No such file or directory: ‘/tmp/happy-or-sad.zip’ !!!

Help me, please, Mr.Mentor !