vetiver.VetiverAPI.run#

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

Start API

Parameters
  • port (int) – An integer that indicates the server port that should be listened on.

  • host (str) – A valid IPv4 or IPv6 address, which the application will listen on.

Examples

>>> import vetiver as vt
>>> X, y = vt.get_mock_data()
>>> model = vt.get_mock_model().fit(X, y)
>>> v = vt.VetiverModel(model = model, model_name = "model", prototype_data = X)
>>> v_api = vt.VetiverAPI(model = v, check_prototype = True)
>>> v_api.run()