This example builds a mock text generation model. It is wrapped in a callable object that implements the text-generation task.
make_model.py uses dill to serialize the object into model.bin. The final upload is a zip file containing model.bin, requirements.txt, and config.json. 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.