jfilter / ptf-kommentare-backend

Serving locale view of GenSim's KeyedVectors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ptf-kommentare-backend

A mirco service ("API") to serve 2D locale views around a given token in an vector space ("word embedding"). Powered by GenSim's KeyedVectors. Deployed with Dokku.

Used for https://kommentare.vis.one, more information: https://github.com/jfilter/ptf-kommentare.

Development

  1. install with Pipenv
  2. create a folder data and put keyedvector models in it ('filename.model'). The filenames will be used later on as endpoints in the API
  3. pipenv run python app.py
  4. curl localhost:5000/filename?q=test

Production

  1. create Dokku app etc., set env variable FILTER_PRODUCTION
  2. dokku storage:mount the-app-name /home/some/folder:/data and put models in that folder (see above)
  3. Create Dokku redis service and link it
  4. git push dokku

License

MIT.

About

Serving locale view of GenSim's KeyedVectors

License:MIT License


Languages

Language:Python 100.0%