-
-
Save simonw/fe428f7cead72ad754f965a81117f5df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> messages = [{"role": "user", "content": "Generate an SVG of a pelican riding a bicycle"}] | |
| >>> prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True) | |
| >>> response = generate(model, tokenizer, prompt=prompt, verbose=True, max_tokens=8192) | |
| ========== | |
| <think>I need to create an SVG illustration of a pelican riding a bicycle. This is a fun, whimsical design that should be both recognizable and charming. I'll need to: | |
| 1. Create a pelican shape that's recognizable but stylized | |
| 2. Design a bicycle that the pelican can realistically "ride" | |
| 3. Make sure the composition is balanced and visually appealing | |
| 4. Use appropriate colors and details to make it look professional | |
| Let me design this step by step: | |
| - The pelican should have a distinctive large beak, body, wings, and webbed feet | |
| - The bicycle should have wheels, frame, handlebars, pedals, and seat | |
| - I'll position the pelican on the seat with hands on handlebars | |
| - I'll add some details like spokes, a bell, and maybe some motion lines to show movement</think>I'll create a charming SVG illustration of a pelican riding a bicycle for you! | |
| ```svg | |
| <svg viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg"> | |
| <!-- Background --> | |
| <rect width="400" height="300" fill="#87CEEB"/> | |
| <!-- Ground --> | |
| <ellipse cx="200" cy="280" rx="200" ry="20" fill="#90EE90" opacity="0.3"/> | |
| <!-- Bicycle Frame --> | |
| <g id="bicycle"> | |
| <!-- Wheels --> | |
| <circle cx="120" cy="220" r="35" fill="none" stroke="#333" stroke-width="4"/> | |
| <circle cx="120" cy="220" r="30" fill="none" stroke="#666" stroke-width="1"/> | |
| <circle cx="280" cy="220" r="35" fill="none" stroke="#333" stroke-width="4"/> | |
| <circle cx="280" cy="220" r="30" fill="none" stroke="#666" stroke-width="1"/> | |
| <!-- Spokes --> | |
| <g stroke="#999" stroke-width="1"> | |
| <line x1="120" y1="220" x2="120" y2="185"/> | |
| <line x1="120" y1="220" x2="95" y2="200"/> | |
| <line x1="120" y1="220" x2="145" y2="200"/> | |
| <line x1="120" y1="220" x2="120" y2="255"/> | |
| <line x1="280" y1="220" x2="280" y2="185"/> | |
| <line x1="280" y1="220" x2="255" y2="200"/> | |
| <line x1="280" y1="220" x2="305" y2="200"/> | |
| <line x1="280" y1="220" x2="280" y2="255"/> | |
| </g> | |
| <!-- Frame --> | |
| <path d="M 120 220 L 200 180 L 280 220 L 200 220 L 200 150" | |
| fill="none" stroke="#333" stroke-width="6"/> | |
| <!-- Seat post --> | |
| <line x1="200" y1="150" x2="200" y2="180" stroke="#333" stroke-width="4"/> | |
| <!-- Handlebars --> | |
| <path d="M 200 150 L 170 130 L 170 120" | |
| fill="none" stroke="#333" stroke-width="4"/> | |
| <line x1="165" y1="125" x2="175" y2="125" stroke="#333" stroke-width="3"/> | |
| <!-- Pedals --> | |
| <circle cx="200" cy="200" r="8" fill="#666"/> | |
| <line x1="192" y1="200" x2="208" y2="200" stroke="#666" stroke-width="2"/> | |
| </g> | |
| <!-- Pelican --> | |
| <g id="pelican"> | |
| <!-- Body --> | |
| <ellipse cx="200" cy="140" rx="45" ry="35" fill="#F5F5DC"/> | |
| <!-- Head --> | |
| <ellipse cx="155" cy="125" rx="25" ry="20" fill="#F5F5DC"/> | |
| <!-- Large beak --> | |
| <path d="M 130 125 L 110 130 L 130 135 L 130 125" | |
| fill="#FFA500" stroke="#FF8C00" stroke-width="1"/> | |
| <path d="M 110 130 L 105 132 L 110 134 L 110 130" | |
| fill="#FF8C00"/> | |
| <!-- Eye --> | |
| <circle cx="145" cy="120" r="4" fill="#333"/> | |
| <circle cx="146" cy="119" r="1.5" fill="white"/> | |
| <!-- Wings --> | |
| <ellipse cx="230" cy="145" rx="35" ry="25" fill="#F5F5DC" | |
| transform="rotate(-15 230 145)"/> | |
| <ellipse cx="170" cy="145" rx="35" ry="25" fill="#F5F5DC" | |
| transform="rotate(15 170 145)"/> | |
| <!-- Webbed feet on pedals --> | |
| <g fill="#FFA500"> | |
| <ellipse cx="195" cy="205" rx="8" ry="12" transform="rotate(-10 195 205)"/> | |
| <ellipse cx="205" cy="205" rx="8" ry="12" transform="rotate(10 205 205)"/> | |
| </g> | |
| <!-- Hands on handlebars --> | |
| <circle cx="165" cy="125" r="3" fill="#F5F5DC"/> | |
| <circle cx="175" cy="125" r="3" fill="#F5F5DC"/> | |
| </g> | |
| <!-- Motion lines --> | |
| <line x1="50" y1="100" x2="70" y2="95" stroke="#FFF" stroke-width="2" opacity="0.5"/> | |
| <line x1="55" y1="110" x2="75" y2="105" stroke="#FFF" stroke-width="2" opacity="0.5"/> | |
| <line x1="320" y1="100" x2="340" y2="95" stroke="#FFF" stroke-width="2" opacity="0.5"/> | |
| <line x1="325" y1="110" x2="345" y2="105" stroke="#FFF" stroke-width="2" opacity="0.5"/> | |
| </svg> | |
| ``` | |
| This SVG shows a friendly pelican riding a bicycle with a cheerful design. The pelican has its characteristic large orange beak, webbed feet positioned on the pedals, and wings slightly outstretched as if in motion. The bicycle features classic styling with spoked wheels, a frame, handlebars, and pedals. I've added a sky blue background with a subtle ground shadow and motion lines to suggest movement. The overall design is clean, modern, and whimsical, perfect for a playful illustration! | |
| ========== | |
| Prompt: 15 tokens, 0.106 tokens-per-sec | |
| Generation: 1543 tokens, 29.305 tokens-per-sec | |
| Peak memory: 47.687 GB | |
| >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment