tease 0.5.1

Rapidly prototype interfaces for your machine learning models
Documentation

Tease

Crates.io Documentation CI License

Turn a Rust function or machine-learning model into a desktop demo. Tease builds the input form and results view, validates submitted values, and runs predictions on a worker thread so the window stays responsive.

Get started

Use Rust 1.88 or newer in a desktop session. Install the platform prerequisites, then add Tease to your application:

cargo add tease

Put this in src/main.rs and run cargo run:

use tease::{Input, Teaser};

fn main() -> Result<(), tease::Error> {
    Teaser::default()
        .with_title("Addition")
        .with_inputs(vec![Input::default(); 2])
        .with_function(|numbers| numbers.iter().sum())
        .run()
}

Tease also accepts typed, fallible callbacks for multiple results. Inputs include numbers, choices, text, images, and CSV tables. Results can include text, plots, images, tables, and class scores. Live prediction, presets, comparisons, and batch prediction are optional. See the feature guide for the APIs, limits, and inference behavior.

Examples

From a Tease checkout, try:

cargo run --locked --example addition
cargo run --locked --example exploration
cargo run --locked --example images
cargo run --locked --example batch
cargo run --locked --example live

The example guide lists all demos and checked results, including SmartCore and AutoML models.

Platform prerequisites

  • macOS: Xcode Command Line Tools and the system WebKit runtime.
  • Windows: MSVC Rust toolchain, Visual Studio C++ build tools, and WebView2 Runtime.
  • Linux: GTK 3 and WebKitGTK 4.1 development and runtime libraries, plus a desktop session. On Ubuntu, install libgtk-3-dev libwebkit2gtk-4.1-dev libxdo-dev libdbus-1-dev.

Run the GUI on the main thread. Built executables still need the target system's webview libraries. See RELEASING.md for distribution and validation checks.

Documentation

License

Licensed under MIT or Apache-2.0, at your option.