To deploy on Syndicai, you need to create a Model. A model is a git repository and path in that repository. Each model consist of deployments.
requirements.txtin your repository. You can add those files whenever you like unless they are in the same directory.
It is the main file that is responsible for running a model. Input and output data are always sent in the form of JSON format in the
def __init__(self, config):
This method is required. It is called once before the API
becomes available. It performs the setup such as downloading /
initializing the model.
:param config (required): Dictionary passed from API configuration.
def predict(self, payload):
This method is required. It is called once per request.
Preprocesses the request payload runs inference, and
post-processes the inference output.
:param payload (optional): The request payload
:returns : Prediction or a batch of predictions.
response = model(payload["url"])
The good practice is to load/download all additional files not placed in repo (e.g. model weights) in the
The file needed to recreate the environment for the model. It is important to give information about the exact version of the library. See the example below.
Log in to the Syndicai Platform, go to the Models page and click Add New Model button.
Models page with Add New Model button
When you go to one of our sample models e.g. Image Classifier, you will see the Syndicai Deploy button. When you click that button, it will automatically redirect you to a Platform filling the form, so that you will only have to click Add. The important note is that you need to be logged in in order to make it work!
Deploy a model with a click-of-a-button.
In order to edit a model go to Model Profile and click a button with three dots (next to the Deploy button).
Edit a model in the Model Profile.