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...
Metadata
Release files for jupyter-anywidget-webllm 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_anywidget_webllm-0.0.1.tar.gz | 1.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_anywidget_webllm-0.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 3.3 MB
Release files / jupyter_anywidget_webllm-0.0.1.tar.gz
| Download URL | jupyter_anywidget_webllm-0.0.1.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37f4328d42e3dd84c3819afa435ce26c829c6691f6b2e00a2195604c84d42d92
|
|
BLAKE2b-256 checksum How to use checksums |
bbf11245a3fec5ed89535837c6dd7afc645011c0c521d98d310afb7d718bc8bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.0
|
Release files / jupyter_anywidget_webllm-0.0.1-py2.py3-none-any.whl
| Download URL | jupyter_anywidget_webllm-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3762a1dba69bf15669936ff0d25d630e987f962f62aff1f78f253ac15138f640
|
|
BLAKE2b-256 checksum How to use checksums |
16de5a7cba3c0e409092f0fd811cb9786dec2f9e2965072dded5eac9f621bb8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.0
|