Skip to content

Notebook 00 Is it a bird? - ImportError: cannot import name 'ddg_images' #112

@JLoodts

Description

@JLoodts

It seems the 1st line in the 4th cell of "00-is-it-a-bird-creating-a-model-from-your-own-data.ipynb":
from duckduckgo_search import ddg_images
raises an ImportError. I tried it in Colab and in Kaggle.
I found a solution from altcee: https://forums.fast.ai/t/lesson-1-official-topic/95287/623?u=jloodts
who referred to SergeyF: https://forums.fast.ai/t/lesson-1-official-topic/95287/608?u=jloodts
I added fastbook to the !pip install line and overwrote the search_images function with
def search_images(term, max_images=30):
print(f"Searching for '{term}'")
return search_images_ddg(term, max_images=max_images)

After that the entire notebook ran without any errors.
Since I am a newbee in all this, I don't know how to propose this code-change myself, but I would certainly want to learn as to keep this wonderfull fastai course notebooks working for all the other students to come. Especially now since Jeremy and co are focussing on Answer.AI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions