Skip to content
/ peppe Public

FastText as a HTTP micro-service with a cool text analyzer (whoosh) and flask

License

Notifications You must be signed in to change notification settings

ebuildy/peppe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peppe is a HTTP API to "obtain the k most likely labels for a piece of text" with fasttext.

You still must build your model manually.

Installation

pipenv install
pipenv shell

Usage

Run web server

FLASK_APP=src/api.py flask run

Open http://127.0.0.1:5000/ in a browser to see available endpoints.

Build clean corpus

python ./src/build_corpus.py ./src/corpus > ./build/fr.txt

Build models

# You need fasttext bin somewhere
# Put model under models folder
fasttext supervised -input build/cooking.train -output models/cooking -lr 1.0 -epoch 25

About

FastText as a HTTP micro-service with a cool text analyzer (whoosh) and flask

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published