Installation:
python3.11 -m venv .venv
pip install jupyterlab
pip install tldraw
jupyterlab (or alternative VS Code Jupyter Lab)
from tldraw import TldrawWidget
t = TldrawWidget()
t
from tldraw import MakeReal
from api_key import api_key
m = MakeReal(width=1002, height = 500, api_key = api_key)
m
INFO: To use GPT4-Vision, you need an API key.
- Create an OpenAI account at OpenAI
- In your Openai API account, navigate to Settings > Billing
- Click Add to credit balance
- Add at least $5 to your account
- Navigate to API Keys
- Click Create new secret key
- Copy the key to your clipboard.
- Back on your jupyter-tldraw folder, paste the key into the API key into a new file called api_key.py
- Add the key in this form:
api_key = "sk-*************************"
. - Add
api_key.py
into your gitignore. WARNING: Don't upload your API KEY on GitHub!
Now you're ready to run!
For transparency, this is how the key is used:
https://github.com/kolibril13/jupyter-tldraw/blob/main/src/tldraw/prompt.py#L5-L47
- Clone Repo
npm i
- Make virutal env
python3.11 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
npm run dev
update npm install @tldraw/tldraw@3.0.0
update npm install @tldraw/tldraw@2.4.5 TldrawSetImage implementation
- fix path
- better TldrawWidgetCoordinates
- update npm install @tldraw/tldraw@2.4.3
- add ReactiveColorPicker
- include "package.json", "node_config.mjs" to pypi, so that conda works as well.
- update to tldraw 2.2.5
- include jsx files on pypi, so that conda can build more easily.
update to tldraw 2.2.4
Add debug example
Experiment with node_config
small fixes
add TldrawWidgetCoordinates
- update tldraw version
- update to GPT4o
- fix svgAsImage problem
- update makereal to gpt4-turbo
- run_next_cell parameter
- fix cell selection bug by autoFocus={false}
- npm i @tldraw/tldraw@2.1.3
- updating npm install @tldraw/tldraw@2.1.0
- Setting up hatch correctly
- Update version to @tldraw/tldraw@2.0.2
*increase number of output tokens to 4096
Tweak prompt parameter.
Add requests module Tweak readme
Add experimental SVG/PNG export.
Add experimental .txt export.
Add makereal
Update to version 2.0.0-alpha.19
Add experimental TldrawImageArray
Switch to new version: @tldraw/tldraw@2.0.0-canary.b9d82466295e
(Version from 6th November2023)
- simplify to minimal template
- Rename notebooks, and prepare 2.0.0 release.
- add .venv to gitignore, so that it's not uploaded to pypi by hatch build.
- Add experimental TldrawSegmentation
- format toml
- replace ipyreact backend with anywidget backend.
- this will make this package more reliable, because all js and css is shipped via pip and not anymore via cdn.
- Remove JupyterLite build.
- Remove experimental files.
- add update_plot in TldrawMatplotlib
- Added TldrawMatplotlib
- refactor readme
- add jupyterlite demo
- refactor code
- init setup