Decode and save binary model output
Steps for deploying an example Truss
Create a Truss
binary_test
. By default, newly created Trusses implement an identity function that returns the exact input they are given.Add logging
binary_test/model/model.py
to log that the data received is of type bytes
:Deploy the Truss
content-type
HTTP header to application/octet-stream
msgpack
to encode the data or fileGettysburg.mp3
in the current working directory. You can download the 11-second file from our CDN or replace it with your own file.
msgpack
encoding with the same encoder and decoder used
by
Truss.model.py
, you must create a streaming output.