This example builds a mock text generation model. It is built and exported in make_model.py
.
inference.py
implements the required two functions load_model
and call_model
that define how to load a model and how the model should be called. The call_model
function correctly follows the text-generation
task schema.
test.py
shows how Backprop uses the model in a production environment.
The upload .zip will contain inference.py
, mymodel.pickle
, config.json
and requirements.txt
. This can be uploaded on Backprop's Dashboard.
The uploaded model can be invoked by making POST requests with the appropriate body to api.backprop.co/text-generation
.