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

Multimodal cookbook prompts don't scroll sideways and are hard to read #69

Open
simonw opened this issue Jul 10, 2024 · 0 comments
Open

Comments

@simonw
Copy link

simonw commented Jul 10, 2024

https://github.com/anthropics/anthropic-cookbook/blob/main/multimodal/how_to_transcribe_text.ipynb

Screenshot showing a code block labelled: There is no way to scroll sideways to see the rest of this truncated text

This is even worse on mobile, where the screen is narrower so often most of the code is impossible to view.

I just reported this bug to GitHub here:

For the moment there are two things you could do:

  1. Publish these notebooks elsewhere - maybe via GitHub Pages - such that they can be read
  2. (Easier) Edit these notebooks so the prompts are readable despite this GitHub bug

An example of option 2, adapted from https://github.com/anthropics/anthropic-cookbook/blob/main/multimodal/best_practices_for_vision.ipynb

message_list = [
    {
        "role": 'user',
        "content": [
            {
                "type": "image",
                "source": {
                    "type": "base64",
                    "media_type": "image/jpeg",
                    "data": get_base64_encoded_image(
                        "../images/best_practices/"
                        "nine_dogs.jpg"
                    )
                }
            },
            {
                "type": "text",
                "text": "You have perfect vision "
                        "and pay great attention to "
                        "detail which makes you an "
                        "expert at counting objects "
                        "in images. How many dogs "
                        "are in this picture? "
                        "Before providing the "
                        "answer in <answer> tags, "
                        "think step by step in "
                        "<thinking> tags and "
                        "analyze every part of the "
                        "image."
            }
        ]
    }
]
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

1 participant