Skip to main content

Unique Interface

A compact, monochrome interface for Python chat and file-review tools. The notebook chat is centered and capped at 800 px, with a 144 px conversation sidebar on larger screens. User prompts appear on the right, answers on the left. Press Enter to send. Retry replaces the last answer, and New chat starts a separate conversation in the current session.

Try the public UniqueChat Space · Open UniqueChat in Colab · Open SheetReview in Colab

Install by name

In Colab, Jupyter or a VS Code notebook, run:

%pip -q install --upgrade unique-interface

In a terminal, run python -m pip install --upgrade unique-interface. Restart an already-running kernel if it imported an older release before the upgrade.

Show a notebook chat

from unique_interface import ChatInterface

def answer(message, history):
    return f"You wrote: {message}"

chat = ChatInterface(answer, title="My chat").launch()

The example echoes text. Replace the callback with your model function to generate answers. It receives the current message and earlier role/content dictionaries. Return a string for a word-by-word reveal, or yield text chunks for live generation. In Colab, enable widgets before launch with from google.colab import output and output.enable_custom_widget_manager().

Open a full-page chat from a Python script

from unique_interface import serve

def answer(message, history):
    return f"You wrote: {message}"

serve(answer, title="My chat")

Run the script on your computer. A new browser tab opens at the printed loopback URL. Each tab keeps its conversation in memory. Stop the server with Ctrl+C. The full-page composer supports Enter to send and Shift+Enter for a new line. A hosted Colab runtime has its own loopback address, so use the inline widget or a deployed Space there.

Share a public or restricted URL

The public demo can be opened in a new tab or shared. To host your own copy, open the demo and choose Duplicate this Space from its menu. Choose Public for a shareable link or Private to let Hugging Face restrict access to authorized members. Each visitor starts their own conversation. Sharing a deployment link does not share a transcript.

To display links to your deployments in a notebook:

chat.set_links(
    public_url="https://huggingface.co/spaces/unique50101/UniqueChat",
    private_url="https://huggingface.co/spaces/YOUR-ORG/YOUR-PRIVATE-SPACE",
)

Replace the private URL with an actual access-controlled deployment or omit it. The link label alone grants no access control.

Build a Hugging Face Static Space with your model

from unique_interface import export_space

export_space("index.html", model="HuggingFaceTB/SmolLM2-135M-Instruct", title="My chat")

Run this in an empty directory, create a Static → Blank Space, and upload the generated index.html as its entry page. The exported app uses the bundled Unique Interface layout. It loads Transformers.js and a compatible ONNX text-generation model with a chat template and q4 weights into the visitor's browser. The first model load needs internet. For a Python-only model, use the Python callback in your own Python runtime. Static hosting runs JavaScript inference and does not execute Python callbacks.

Review and download a file

from unique_interface import FileInterface

def inspect_file(path, folder):
    return f"Received {path.stat().st_size} bytes", None

review = FileInterface(inspect_file, title="Inspect a file").launch()

Return a plain-text summary and an optional generated file path to show a download link. The default input limit is 10 MiB. SheetReview's notebook provides a complete CSV/XLSX example.

Metadata

Release files for unique-interface 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unique-interface 0.1.3
File Size Uploaded Provenance Actions
unique_interface-0.1.3.tar.gz 21.3 kB With provenance Details for unique_interface-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unique-interface 0.1.3
File Interpreter ABI Platform Actions
unique_interface-0.1.3-py3-none-any.whl Python 3 none any Details for unique_interface-0.1.3-py3-none-any.whl

Total release size: 40.2 kB

Release files / unique_interface-0.1.3.tar.gz

Download URL unique_interface-0.1.3.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ad62cf7e08d603a41da06cf0af5d964a83651b397be8b8d4dec4871cc9fabe78
BLAKE2b-256 checksum
How to use checksums
35c9dd0249b77aad58015b538e0e212525d80d360c712d086083dbb582d2c265
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / unique_interface-0.1.3-py3-none-any.whl

Download URL unique_interface-0.1.3-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb768bd27ea70ae309f27151f6545cfb50bef953f8fb636f6d912006349d9add
BLAKE2b-256 checksum
How to use checksums
e14fddb7cb6283a3d97b8b247f8c4de96e8719fdf11d763a95b49884b0f4de5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for unique-interface 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for unique_interface-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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