Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with images on the quickstart recipes notebook #804

Open
1 of 2 tasks
ArturoNereu opened this issue Nov 30, 2024 · 0 comments
Open
1 of 2 tasks

Error with images on the quickstart recipes notebook #804

ArturoNereu opened this issue Nov 30, 2024 · 0 comments
Assignees

Comments

@ArturoNereu
Copy link

ArturoNereu commented Nov 30, 2024

System Info

The images folder must be created when opening the notebook on Collab. Is not automatically added when starting the notebook.

https://github.com/meta-llama/llama-recipes/blob/main/recipes/quickstart/build_with_Llama_3_2.ipynbCollab

Information

  • The official example scripts
  • My own modified scripts

🐛 Describe the bug

Something during the notebook installation doesn't bring the images folder to the content folder.

The files are in the repository, just not copied over when starting the notebook.

Error logs

FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-7-50fd4ee5715d>](https://localhost:8080/#) in <cell line: 10>()
      8     plt.show()
      9 
---> 10 display_local_image("images/a_colorful_llama_doing_ai_programming.jpeg")

1 frames
[/usr/local/lib/python3.10/dist-packages/PIL/Image.py](https://localhost:8080/#) in open(fp, mode, formats)
   3467                     return im
   3468             except (SyntaxError, IndexError, TypeError, struct.error) as e:
-> 3469                 if WARN_POSSIBLE_FORMATS:
   3470                     warning_messages.append(i + " opening failed. " + str(e))
   3471             except BaseException:

FileNotFoundError: [Errno 2] No such file or directory: '/content/images/a_colorful_llama_doing_ai_programming.jpeg'

Expected behavior

The image file should be present in the files directory (content/images/...) and the

from PIL import Image
import matplotlib.pyplot as plt

def display_local_image(image_path):
    img = Image.open(image_path)
    plt.imshow(img)
    plt.axis('off')
    plt.show()

display_local_image("images/a_colorful_llama_doing_ai_programming.jpeg")

cell should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants