Skip to main content

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)

Source distribution for jupyter-anywidget-webllm 0.0.1
File Size Uploaded
jupyter_anywidget_webllm-0.0.1.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-anywidget-webllm 0.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page