Modular word-embedding demo built on pretrained GloVe vectors, with both a CLI and a Streamlit frontend.
uv syncpython -m venv .venv
.\.venv\Scripts\activate.bat
pip install -e .python -m streamlit run app/scripts/streamlit_app.pyNotes:
- The app shows a dropdown with all downloadable gensim models.
- Models are not all loaded at startup. Only the model you select is loaded.
- First load downloads the model; later runs use the local cache (
.cache/gensim-databy default).
Show a word vector:
python -m app.scripts.word_vectors_cli vector --word kingCosine similarity:
python -m app.scripts.word_vectors_cli similarity --word1 king --word2 queenWord math:
python -m app.scripts.word_vectors_cli math --expression "king - man + woman" --topn 5Preload model(s) into cache:
python -m app.scripts.preload_models --model-names glove-wiki-gigaword-300List available models:
python -m app.scripts.preload_models --listBuild:
docker build -t embeddings-app .Run:
docker run -it --rm -p 8501:8501 embeddings-appRun tests:
pytest