mirror of
https://github.com/tiennm99/word2sim.git
synced 2026-07-30 06:21:59 +00:00
Stateless FastAPI service exposing word2vec cosine similarity, nearest neighbors, vocab lookup, and random-word picker. Dockerized with gensim GoogleNews pretrained model support.
18 lines
431 B
YAML
18 lines
431 B
YAML
services:
|
|
word2sim:
|
|
build: .
|
|
container_name: word2sim
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
MODEL_NAME: word2vec-google-news-300
|
|
volumes:
|
|
- gensim-cache:/data/gensim-cache
|
|
# mount a locally trained vectors.bin instead of downloading:
|
|
# - ./vectors.bin:/models/vectors.bin:ro
|
|
# and set MODEL_PATH: /models/vectors.bin above
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
gensim-cache:
|