| File | Date | Author | Commit |
|---|---|---|---|
| examples | 2016-09-27 |
|
[fb1b76] Initial comit |
| halef_setu | 2016-09-27 |
|
[fb1b76] Initial comit |
| halef_setu_api | 2016-09-27 |
|
[fb1b76] Initial comit |
| .gitignore | 2016-09-27 |
|
[fb1b76] Initial comit |
| LICENSE.txt | 2016-09-27 |
|
[fb1b76] Initial comit |
| MANIFEST.in | 2016-09-27 |
|
[fb1b76] Initial comit |
| README.md | 2016-09-27 |
|
[fb1b76] Initial comit |
| TODO.md | 2016-09-27 |
|
[fb1b76] Initial comit |
| requirements.txt | 2016-09-27 |
|
[fb1b76] Initial comit |
| setup.py | 2016-09-27 |
|
[fed0ed] Released on PyPi |
This package provides wrapper around statistical models created with
SciKit-Learn Laboratory (SKLL) as well as an easy to use API based
on Flask.
pip install halef-SETU
Create a 'config.cfg' file like the following:
config.cfg
DEBUG = False
HALEF_SLU_MODELS='slu_models.ymal'
Set the location of this configuration file inside an environment variable:
export HALEF_SETU_SETTINGS=<path/to/config.cfg>
Create the 'slu_models.yaml' file:
slu_models.yaml
model_dir: <path/to/directory/containing/model/and/vocab/files/>
reject_class: <name_of_the_class_for_nomatch>
items:
- <item_name>:
- state: <state_name>
model: <slu_model_file_name>.model
vocab: <slu_model_vocab_file_name>.vocab
classes:
- <class_1_name>
- <class_2_name>
- <class_3_name>
- state: <some_other_state_name>
model: <some_other_slu_model_file_name>.model
vocab: <some_other_slu_vocab_file_name>.vocab
classes:
- <some_other_class_1>
- <some_other_class_2>
Create a file to start the API. This can be hosted like any other Flask application.
A quick example would be:
run.py
from halef_setu_api import app
app.run()
python run.py