Add model inference and invoke the model server
To complete model/model.py
, we’ll implement model inference and invoke our finished model.
The Model.predict()
function runs every time the model server is called.
We’ll use the text classification model in predict()
and return the results:
After truss watch
shows that the server is updated, it’s time to invoke your finished model using truss predict
in your terminal:
Invocation
Response
Add model inference and invoke the model server
To complete model/model.py
, we’ll implement model inference and invoke our finished model.
The Model.predict()
function runs every time the model server is called.
We’ll use the text classification model in predict()
and return the results:
After truss watch
shows that the server is updated, it’s time to invoke your finished model using truss predict
in your terminal:
Invocation
Response