This tutorial will guide you step-by-step through:
- Creating a Truss
- Connecting your local development environment to a model server
- Deploying a basic text classification model
- 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:
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):
pass
def predict(self, model_input):
return model_input