VetiverAPI.run
VetiverAPI.run(port=8000, host='127.0.0.1', quiet_open=False, **kw)
Start API
Parameters
Name | Type | Description | Default |
---|---|---|---|
port |
int | An integer that indicates the server port that should be listened on. | 8000 |
host |
str | A valid IPv4 or IPv6 address, which the application will listen on. | '127.0.0.1' |
quiet_open |
bool | If host is a localhost address, try to automatically open API in browser | False |
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()