All documentation pages

    6 min read

    Deploying and Packaging Models

    Deploy a model you trained or a pretrained Hugging Face model, validate it, try it in the playground for text, image, audio or tabular input, export a standalone page, and use packages built by pipelines.

    Three starting points

    The Deployment view has three tabs:

    • Models You Trained: the models kept in the open project. If it says none were found, train one in the Model Builder or save one from code with dlway.saveModel(...). Models are listed for the project that is open.
    • Pretrained Hugging Face Model: run a public model in your browser through transformers.js. Type a model ID such as Xenova/distilbert-base-uncased-finetuned-sst-2-english, or Browse Hugging Face Hub and choose a task.
    • Pipeline packages: packages built by a pipeline's Build Package step.

    Validate, then go live

    Choose a model and press Validate. DLWAY loads the model and tests it with a real input before it reports the deployment as live; a failure shows why and the playground stays closed. If the model's input or output type could not be worked out, you can set the modality by hand, and validation uses your choice.

    The playground

    Once a deployment is live, the playground accepts the input type the model expects:

    • Tabular: one numeric field per feature, labelled with the training column names.
    • Text: a text box. Models trained in DLWAY encode text with a hashing tokenizer, so their text output is raw token IDs; no vocabulary exists to turn them back into words.
    • Image: upload a picture.
    • Audio: upload an audio file. Audio works for pretrained Hugging Face audio models; models trained in DLWAY do not accept audio yet.

    Press Run Inference to see the result: class probabilities for a classifier, a value for a regressor, text for a text model.

    Supported Hugging Face tasks include text classification, zero-shot classification, token classification (NER), question answering, summarisation, translation, text generation, fill-mask, image classification, zero-shot image classification, image captioning, object detection, speech recognition and audio classification. The first run downloads the model's files from the Hub and caches them.

    Export a standalone playground

    After a deployment is live, Export Standalone Playground downloads one HTML file that runs the same model in any modern browser with no build step. For a model you trained, the model artifact is embedded in the file and TensorFlow.js is loaded from a CDN. For a Hugging Face model, the file fetches it from the Hub the first time it is opened. Host the file anywhere that serves static files, or open it locally.

    Packages built by pipelines

    A pipeline's Build Package step turns a trained model into a package: a browser demo page, the model file, or both, plus a manifest.json that lists every file with its hash. Before packaging it checks the model with one input in a worker (unless you turn the check off). Rebuilding the same model the same way gives the same package hash.

    Put a Quality Gate in front of it. When a gate's decision is connected, the model is packaged only if the decision approves that very model; a rejection ends the run as "gated" and nothing is built. The Pipeline packages tab lists what exists, lets you Download .zip, and can open the packaged model in the Deployment view.

    A package is a ready-to-use file set. It is not a running endpoint: you host or open the files yourself.

    Gate conditions

    A quality gate compares an evaluation with thresholds you set, or with a baseline evaluation. For classification you can use accuracy, macro and weighted precision, recall and F1; for regression, the error and fit metrics the evaluator reports. A missing or undefined metric fails its condition, and a baseline comparison is only made when both evaluations used the same task, partition, classes and dataset version. See Pipeline step reference.

    Data and privacy

    Everything above runs locally. Nothing is uploaded when you deploy or export. Using a Hugging Face model contacts the Hub to download its files. See Privacy and storage.