glove-semantic-explorer
Set up embedding explorer on a corpus with GloVe word embeddings with an easy-to-use CLI.
Installation
You can install the CLI from PyPI:
We recommend that you use a Linux/Unix system, preferably Debian when using this tool. Windows and MacOS could still work, but we do not guarrantee this.
pip install glove-semantic-explorer
Usage
1. Train a model
You will need a corpus in the format of a bunch of .txt files in a folder.
Every line in a file should represent one sentence/passage.
To train a GloVe model on the corpus, run:
python3 -m glove_semantic_explorer train_model dat/ -o model/glove.kv
This will output a keyed vectors file to model/glove.kv.
2. Run the Explorer
To run the explorer on the trained model locally, run:
python3 -m glove_semantic_explorer run_explorer -m model/glove.kv --port 8080
This will start embedding-explorer on the trained embedding model on port 8080.
3. Deploy!
You can deploy the application using docker compose.
The way this can be done with our CLI is by auto-generating a Dockerfile, a compose.yaml and a main.py file, that contains all the code for running the server.
To output this into a folder called deployment/, run the following command:
python3 -m glove_semantic_explorer generate_docker "your_project_name" -m model/glove.kv -p 8080 -o deployment/
Beware that the model file only gets mounted to the container, and thus should not be removed, moved or renamed.
To deploy the app with docker compose run the following:
cd deployment/
sudo docker compose up
The app will then run on port 8080.
Metadata
Release files for glove-semantic-explorer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| glove_semantic_explorer-0.1.1.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| glove_semantic_explorer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / glove_semantic_explorer-0.1.1.tar.gz
| Download URL | glove_semantic_explorer-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3dfb7b3ff021af6ee146cd15a32761a025d011e76fae570cb41fd2ea0fd9ca8
|
|
BLAKE2b-256 checksum How to use checksums |
4e22a20834f8fc8dc5400302468abe2615eed103ec9e12f87b139ca881d5afac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.9.13 Linux/5.15.0-105-generic
|
Release files / glove_semantic_explorer-0.1.1-py3-none-any.whl
| Download URL | glove_semantic_explorer-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f36912414d8423e453050cfffecd159b40b3ac08a1193cc4418ffdddd474e23a
|
|
BLAKE2b-256 checksum How to use checksums |
a0484e0b9703ae58370f0be1fc10aaf60a5019e0f2ccbe300e053707954c3bee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.9.13 Linux/5.15.0-105-generic
|
Security for glove-semantic-explorer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.