Cerebro manage the NLU (Natural Language Understanding) part of Milobella.
python -m spacy download fr_core_news_md
pip install -r requirements.txt
pip install -e .
Update the spacy_sandbox/simple_cats.py file with the new sentences and categories.
python spacy_sandbox/simple_cats.py
It might take a few minutes.
$ sanic cerebro.server.app --dev
When the server is running, this is not over. You have two tasks to perform to make it work. To facilitate these steps scripts has been built in scripts folder.
cd scripts
./upload_model.sh
./train_model.sh
./poll_model.sh # To repeat until the 503 message disappears /!\ It can take several minutes
$ curl -iv -X PUT 'http://localhost:9444/models/default/samples' -d samples.json
An example of samples.json
file format is here : ./scripts/samples.json
$ curl -iv -X POST 'http://localhost:9444/models/default/train'
$ curl -iv -X POST 'http://localhost:9444/understand' -d '{"text": "Bonjour"}'