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
from IPython.display import HTML, Image | |
from google.colab.output import eval_js | |
from base64 import b64decode | |
canvas_html = """ | |
<canvas width=%d height=%d></canvas> | |
<button>Finish</button> | |
<script> | |
var canvas = document.querySelector('canvas') | |
var ctx = canvas.getContext('2d') |
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
#@title <font color='red'>Drawing APP</font> {vertical-output: true, run: "auto"} | |
import ipywidgets as widgets | |
from ipywidgets import Layout, Button, Box | |
from IPython.display import display, HTML, Image | |
from google.colab.output import eval_js | |
from base64 import b64decode | |
Square_Size = 256 #@param ["256", "512"] {type:"raw"} | |
Brush_Size = 30 #@param {type:"slider", min:0, max:100, step:5} |
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
<artifacts_info> | |
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
# Good artifacts are... | |
- Substantial content (>15 lines) | |
- Content that the user is likely to modify, iterate on, or take ownership of | |
- Self-contained, complex content that can be understood on its own, without context from the conversation | |
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
- Content likely to be referenced or reused multiple times |