- clone repo
$ git clone https://github.com/michael-gerstenberg/thaiAI-api.git
- setup and activate python environment, install required packages
$ cd thaiAI-api $ virtualenv -p python3 ENV $ source ENV/bin/activate $ pip install flask tltk uWSGI
- set port in nginx
$ uberspace web backend set / --http --port 1024
- create
~/etc/services.d/flask.ini
[program:flask] directory=%(ENV_HOME)s/thaiAI-api command=%(ENV_HOME)s/thaiAI-api/ENV/bin/uwsgi uwsgi.ini
- setup daemon (refresh supvervisord config)
$ supervisorctl reread $ supervisorctl update
POST https://thaiai.uber.space/syl_segment HTTP/1.1
content-type: application/json
{
"text": "เวลาหลังเที่ยงคืนถึงเที่ยงวัน"
}
Michael - [email protected]
Robin - [email protected]