Now, you are ready to deploy your model to Modelify. Firstly, you need create a application from Modelify Cloud . To do so, you must first establish an account. It is very simple to create an account, and no need credit card.
After logging in to the platform, use the right menu to create an application. The application will appear on your home page after it has been created. Click this application, you will have seen 2 information;
- Connection Api Key
- APP UID
Firstly, link your Modelify Cloud account with your connection api key.
After connection established, you are able to deploy your model with your APP UID and model inference object.
Final code would be as follows;
import pandas as pd
from sklearn.datasets import load_iris
from lightgbm import LGBMClassifier, Dataset, train as train_lgbm
from modelify import ModelInference
from modelify.helpers import create_schema
# import data
iris = load_iris()
df= pd.DataFrame(data= np.c_[iris['data'], iris['target']],
columns= iris['feature_names'] + ['target'])
# train test split
train, test = train_test_split(df, test_size=0.2 )
y_train = df["target"]
X_train = df.drop(columns=["target"])
# build your model
clr = LGBMClassifier()
inference = ModelInference(model=model, framework="LIGHTGBM", inputs=create_schema(X_train))
Finally, refresh your application page on Modelify Cloud. After making the settings of the serverless API you will create according to your needs, click the "Deploy Application" button. Your service will be ready in 1-2 minutes on average.