Jupyter anywidget for sideloading webllm wasm
Project description
jupyter_anywidget_webllm
Example Jupyter anywidget that will sideload a web-llm model into the browser and run prompts against it.
For example:
from jupyter_anywidget_webllm import webllm_headless
# Load the headless widget
w = webllm_headless()
# Wait for webllm wasm to load (blocking;; does not work in JupyterLite)
w.ready()
# Try a conversion
# This is blocking - does not work in JupyterLite
output = w.convert("Write me a poem")
output
#Non-blocking
w.base_convert("Write me a story")
# When it's ready, collect from:
w.response
> {'status': 'processing'}
> {'status': 'completed', 'output_raw': 'OUTPUT'}
TO DO: ALLOW a json outpur template from a string or file: Use w.convert_from_file(path, output_template="", timeout=3) etc. to load from a local file path or a URL.
Installation
pip install jupyter_anywidget_webllm
or with uv:
uv add jupyter_anywidget_webllm
Open example.ipynb in JupyterLab, VS Code, for a demo...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyter_anywidget_webllm-0.0.1.tar.gz.
File metadata
- Download URL: jupyter_anywidget_webllm-0.0.1.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37f4328d42e3dd84c3819afa435ce26c829c6691f6b2e00a2195604c84d42d92
|
|
| MD5 |
a2773c42abff8072ea4f5a451604c5f8
|
|
| BLAKE2b-256 |
bbf11245a3fec5ed89535837c6dd7afc645011c0c521d98d310afb7d718bc8bb
|
File details
Details for the file jupyter_anywidget_webllm-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: jupyter_anywidget_webllm-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3762a1dba69bf15669936ff0d25d630e987f962f62aff1f78f253ac15138f640
|
|
| MD5 |
428987e08370c952ea7d6215d58b7b5c
|
|
| BLAKE2b-256 |
16de5a7cba3c0e409092f0fd811cb9786dec2f9e2965072dded5eac9f621bb8f
|