Repository navigation
fix(examples,quickstarts): replace broken sample media URLs - #1662
dsugurtuna wants to merge 2 commits into
Conversation
…REST, Image_out, and Opossum_search
|
Notebooks changed:
Review visual diffs and comment on any notebook cell. All comments sync back to this PR. Powered by ReviewNB |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses broken external media dependencies in the cookbook's documentation and examples. By replacing inaccessible URLs with reliable GCS mirrors and updated Wikimedia paths, the changes ensure that users can successfully run the provided quickstarts and examples without encountering network errors. Stale notebook outputs were also removed to maintain repository cleanliness. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates image and video URLs across several files, including switching the video download source in quickstarts/rest/Video_REST.ipynb to a GCS mirror. However, the changes also clear the execution outputs in both examples/Opossum_search.ipynb and quickstarts/rest/Video_REST.ipynb. The review feedback requests that these notebooks be run and saved with their outputs populated, rather than cleared, to align with the repository's style guide.
| "output_type": "display_data" | ||
| } | ||
| ], | ||
| "outputs": [], |
There was a problem hiding this comment.
According to the repository style guide, we want the outputs to be saved in the notebooks so that readers can see what the code does without running it. Instead of clearing the outputs completely, please run the notebook to regenerate and save the updated outputs with the new opossum image URL.
References
- Ideally we want the outputs to be saved in the notebooks so that one can see what the code does without running it. (link)
| ] | ||
| } | ||
| ], | ||
| "outputs": [], |
There was a problem hiding this comment.
According to the repository style guide, we prefer to keep outputs saved in the notebooks so that readers can see the execution results. Instead of clearing the output of the download cell, please run the notebook to regenerate and save the updated output showing the successful download from the GCS mirror.
References
- Ideally we want the outputs to be saved in the notebooks so that one can see what the code does without running it. (link)
|
Thanks for the review! I populated For |
Replaces three failing (
HTTP 400/403) third-party sample media URLs with verified working URLs across active cookbook examples and quickstarts:quickstarts/rest/Video_REST.ipynb(cell 11):wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4now fails withHTTP 403(cf-mitigated: challenge). Switched to the cookbook's official GCS mirrorhttps://storage.googleapis.com/generativeai-downloads/videos/Big_Buck_Bunny.mp4(-O BigBuckBunny_320x180.mp4), returningHTTP 200(video/mp4, exact same64657027bytes) while preservingVIDEO_PATH="./BigBuckBunny_320x180.mp4".quickstarts-js/Image_out.js(line 844):1374px-Lunch_atop_a_Skyscraper_-_Charles_Clyde_Ebbets.jpgreturnsHTTP 400from Wikimedia; updated to standard Wikimedia step1280px-...(HTTP 200,1280x1006JPEG).examples/Opossum_search.ipynb(cell 10 & saved outputs):292px-Opossum_2.jpgreturnsHTTP 400from Wikimedia; updated to standard Wikimedia step330px-Opossum_2.jpg(HTTP 200,330x271JPEG) and cleared stale outputs referencing292px-Opossum_2.jpg.Verification
python3 tools/nbfmt_cli.py --test quickstarts/rest/Video_REST.ipynb examples/Opossum_search.ipynb([TEST PASSED])python3 tools/nblint_cli.py --repo=google-gemini/cookbook --branch=main quickstarts/rest/Video_REST.ipynb examples/Opossum_search.ipynb(0 failed)python3 tools/check_all_links.py quickstarts/rest/Video_REST.ipynb examples/Opossum_search.ipynb([SUCCESS] All links are healthy and valid!)node --check quickstarts-js/Image_out.js(exit 0)HTTP 200and decoded media payload/dimensions for all three replacement URLs.