Cannot download api in Cats and Dogs Image Classifier

I am having a problem downloading files in cats and dogs api from freecodecamp.

Basically the keras.utils.get_file() has no option to add headers. And the api requires headers to have access to the files.

Is there any other method by which I can download the files ?

The link to the api is. => https://cdn.freecodecamp.org/project-data/cats-and-dogs/cats_and_dogs.zip

The link to the challenge is => https://www.freecodecamp.org/learn/machine-learning-with-python/machine-learning-with-python-projects/cat-and-dog-image-classifier

The link to my present code is =>

I am also seeing the same issue. It works fine if I directly download it from the browser but will not work if done in a notebook.

1 Like

Workaround for this issue is to use wget. It will download it to your current directory.

!wget https://cdn.freecodecamp.org/project-data/cats-and-dogs/cats_and_dogs.zip
!unzip cats_and_dogs.zip
train_dir = os.path.join(os.getcwd(),  'cats_and_dogs/train')

“”"