llm-clip
LLM plugin for embedding images and text using CLIP
Installation
Install this plugin in the same environment as LLM.
llm install llm-clip
Usage
Once you have installed an embedding model you can use it to embed text like this:
llm embed -m clip -c 'Hello world'
Or an image like this:
llm embed -m clip --binary -i IMG_4801.jpeg
Embeddings are more useful if you store them in a database - see the LLM documentation for details.
To embed every photograph in a folder and save them in a collection called "photos":
llm embed-multi photos -m clip --binary --files photos/ '*.jpg'
You can then search for photos of specific things like this:
llm similar photos -c 'bunny'
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-clip
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for llm-clip 0.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 | Actions |
|---|---|---|---|---|
| llm-clip-0.1.tar.gz | 6.6 kB | Without provenance | Details for llm-clip-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_clip-0.1-py3-none-any.whl | Python 3 | none | any | Details for llm_clip-0.1-py3-none-any.whl |
Total release size: 13.5 kB
Release files / llm-clip-0.1.tar.gz
| Download URL | llm-clip-0.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcd7efe71a55170b530c30dbf4088d8af80c72562dc85dbd6ec48324525dbb7e
|
|
BLAKE2b-256 checksum How to use checksums |
7beff16404d79cff379f3098ce95cbe205929a01dfa6b5946331fdfe7b0e4f53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / llm_clip-0.1-py3-none-any.whl
| Download URL | llm_clip-0.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31bca3c6dd3e4df192a805ff7d44eb788ccf6d4f1cb8b078f28adc8a2d547e1d
|
|
BLAKE2b-256 checksum How to use checksums |
05512a9b1b753c8f127275ccbbc8ae3cc3bfd6af9882566542273583ad885369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for llm-clip 0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.