it is now maintained in https://github.com/ai4os-hub/ai4os-demo-app
A minimal toy application for demo and testing purposes. It can serve as a reference implementation of current best practices in the project (mirroring the DEEP template).
This demo module implements:
- dummy inference, ie. we return the same inputs we are fed. If some input is not fed we generate a default one.
- dummy training, ie. we sleep for some time and output some random monitoring metrics.
To launch it, first install the package then run deepaas:
git clone https://github.com/deephdc/demo_app
cd demo_app
pip install -e .
deepaas-run --listen-ip 0.0.0.0
The associated Docker container for this module can be found in deephdc/DEEP-OC-demo_app.
Samples for media files are provided in ./data
.
The two branches in this repo cover the two main usecases:
- master: this is a reference implementation on how to return a JSON response for
predict()
. - return-files: this is a reference implementation on how to return non-JSON responses for
predict()
. This is particularly useful when returning:- long responses (that could better fit better in a
txt
file), - media files (eg. returning an image),
- multiple files (for example returning an image and a text file at the same time, packing them into a zip file).
- long responses (that could better fit better in a
The train()
function is common for both branches.