VetiverAPI.run

VetiverAPI.run(port: int = 8000, host: str = '127.0.0.1', quiet_open, **kw)

Start API

Parameters

port : int = 8000

An integer that indicates the server port that should be listened on.

host : str = '127.0.0.1'

A valid IPv4 or IPv6 address, which the application will listen on.

quiet_open : bool = False

If host is a localhost address, try to automatically open API in browser

Examples

from vetiver import mock, VetiverModel, VetiverAPI
X, y = mock.get_mock_data()
model = mock.get_mock_model().fit(X, y)

v = VetiverModel(model = model, model_name = "my_model", prototype_data = X)
v_api = VetiverAPI(model = v, check_prototype = True)
v_api.run()