Skip to main content

Getting started

Modelbit helps you deploy ML models from Git and Python notebooks to REST APIs, called deployments.

To begin, create a Modelbit account. Then choose between the Git and Python notebook workflows below to create your first deployment.

Starting with Git

Your Modelbit workspace backed by a Git repository which means you can create and update your models and REST APIs with a simple git push.

First, install the modelbit package with pip:

pip install --upgrade modelbit

Then clone your Modelbit repo with modelbit clone:

modelbit clone

This will create a modelbit directory that represents your Modelbit workspace, including all of your deployments.

After your repository has been cloned, enter its directory and create your first deployment with the deployment create command:

cd modelbit
modelbit deployment create --name hello_world

Take a look at the sample code in deployments/hello_world/source.py and then push to Modelbit:

git add .
git commit -m "First deployment"
git push

Running the code above will display a link to the deployment's overview page including logs and sample code showing how to call the deployment.

Continue to the Git section to learn more about deploying with Git.

Starting with a Python notebook

Use a Python notebook like Hex or Colab and install the modelbit package with pip:

!pip install --upgrade modelbit

Then import and log in to Modelbit:

import modelbit
mb = modelbit.login()

Modelbit deployments begin with Python functions. The following example creates an deployment to double numbers:

def example_doubler(half: int) -> int:
return half * 2

mb.deploy(example_doubler)

Running the code above will display a link to the deployment's overview page including logs and sample code showing how to call the deployment.

Continue to the Deployments section to learn more about deploying from a notebook.

Next steps

Make more advanced deployments and take advantage of more of Modelbit's capabilities by reading on: