fastbook
fastbook copied to clipboard
Convert Chapter 2 to use DDGo to smooth learning experience?
Synopsis
Setting up a Microsoft Azure account for learning purposes is distracting, especially for Chapter 2. There has to be a keyless way to get some image URL's...I was just talking about this in #648 so I wanted to share my result.
Problem
I followed all the instructions (in Fastbook and elsewhere), but I was still having trouble creating the Azure cloud resource to do the Bing Image search (deployment failure, BadRequest, Internal Server Error).
Expected Behavior
Do Chapter 2 without signing up for more things, and to minimize the distractions so the attention can be paid to learning PyTorch.
Observed Behavior
I spent more time trying to figure out Azure portal, than simply adjusting the Chapter 2 to use DDGS and submitting this PR! Now I can complete Chapter 2 and continue on with the book confidently.
Proposed Solution
Use a DDGS library which requires no key, with the trade off of being limited by query volume.
Content of this PR
Attached to this PR is a tested notebook which installs the referenced DDGS library. Then, any instances of search_images_bing is replaced with ddgs.images(**query_parameters), I was specific with the query parameters (small, public domain, etc.)
TODO
The literature in the Notebook itself may need more updating, but the code should work and the notebook should run.
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Thanks for this! Unfortunately I get a RateLimitException trying to execute it. I am going to try again tomorrow with some delays between API calls to see if I can get it to work.