This tutorial will guide you step-by-step through:

  1. Creating a Truss
  2. Connecting your local development environment to a model server
  3. Deploying a basic text classification model
  4. Publishing your model to production

On the right side, you’ll see what your Truss should look like after each step!

Install the Truss package

Make sure you’re using the newest version of Truss to complete this tutorial:

pip install --upgrade truss

Create your Truss

Use the truss init <folder-name> command to create a Truss.

truss init my-first-truss

When prompted, give your Truss a name like My First Truss

Get ready to code!

Navigate to the newly created directory:

cd my-first-truss

Open the directory in your favorite text editor, such as Visual Studio Code.

class Model:
    def __init__(self, **kwargs):
        self._model = None

    def load(self):

    def predict(self, model_input):
        return model_input