Skip to content

klebster2/fasttext_fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fasttext_fastapi

A simple API for some of the fasttext functions

  1. install miniconda

  2. create env

conda env create -f environment.yml

and activate env

  1. download model
python3 -c "import fasttext.util; fasttext.util.download_model('en', if_exists='ignore')  # English 300 dim cc vecs"
  1. run uvicorn with the COMPRESS_FASTTEXT flag
COMPRESS_FASTTEXT=false uvicorn src.main:app --workers 1 --host 0.0.0.0 --port 8080
  1. open another shell and run:
curl "http:/0.0.0.0:8080/get_word_neighbors/" -H "Content-Type: application/json" --data '{"word":"hey","neighbors":500,"dropstrange":true}'

About

A simple API for some of the fasttext functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published