Embed anything at lightning speed
Project description
Infra for building multimodal embeddings from unstructured sources, built in Rust for speed and robustness
EmbedAnything is a powerful library designed to streamline the creation and management of embedding pipelines. Whether you're working with text, images, audio, or any other type of data., EmbedAnything makes it easy to generate embeddings from multiple sources and store them efficiently in a vector database.
🚀 Key Features
- Local Embedding Works with local and OpenAI embedding
- MultiModality Works with text and image and will soon expand to audio
- Python Interface: Packaged as a Python library for seamless integration into your existing projects.
- Efficient: Optimized for speed and performance, with core functionality written in Rust.
- Scalable: Store embeddings in a vector database for easy retrieval and scalability.
💚 Installation
pip install embed-anything
🧑🚀 Getting Started
For local models
To use local embedding: we support or Bert
from embed_anything import *
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "Bert")
embeddings = np.array([data.embedding for data in data])
For multimodal embedding: we support CLIP
Requirements Directory with pictures you want to search for example we have test_files with images of cat, dogs etc
from embed_anything import *
data:list[EmbedData] = embed_anything.embed_directory("test_files", embeder= "Clip")
embeddings = np.array([data.embedding for data in data])
query = "photo of a dog"
query_embedding = np.array(embed_anything.embed_query(query, embeder= "Clip")[0].embedding)
similarities = np.dot(embeddings, query_embedding)
max_index = np.argmax(similarities)
Image.open(data[max_index].text).show()
For OpenAI
- Please check if you already have the OpenAI key in the Environment variable.
If you are using embed-anything==0.1.7 version (latest version)
import embed_anything
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "OpenAI")
embeddings = np.array([data.embedding for data in data])
🚧 Contributing to EmbedAnything
First of all, thank you for taking the time to contribute to this project. We truly appreciate your contributions, whether it's bug reports, feature suggestions, or pull requests. Your time and effort are highly valued in this project. 🚀
This document provides guidelines and best practices to help you to contribute effectively. These are meant to serve as guidelines, not strict rules. We encourage you to use your best judgment and feel comfortable proposing changes to this document through a pull request.
Table of Content:
- [Code of conduct]
- [Quick Start]
✔️ Code of Conduct:
Please read our [Code of Conduct] to understand the expectations we have for all contributors participating in this project. By participating, you agree to abide by our Code of Conduct.
🚀 Quick Start
You can quickly get started with contributing by searching for issues with the labels "Good First Issue" or "Help Needed" in the [Issues Section]. If you think you can contribute, comment on the issue and we will assign it to you.
To set up your development environment, please follow the steps mentioned below :
- Fork the repository and create a clone of the fork
- Create a branch for a feature or a bug you are working on in your fork
- If you are working with OpenAI make sure you have the keys
Contributing Guidelines
🔍 Reporting Bugs
- Title describing the issue clearly and concisely with relevant labels
- Provide a detailed description of the problem and the necessary steps to reproduce the issue.
- Include any relevant logs, screenshots, or other helpful information supporting the issue.
💡 New Feature or Suggesting Enhancements
☑️ ToDo
- Vector Database Add functionalities to integrate with any Vector Database
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file embed_anything-0.1.8.tar.gz
.
File metadata
- Download URL: embed_anything-0.1.8.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f136d1e8b0b359c4f738c8fa331591b0bff23d005bd63fc0f4a137e8bf1766c |
|
MD5 | a334b95907b1ffc5c3a6389493ac3e54 |
|
BLAKE2b-256 | 0bde6833a6f52a083aed0a6903049ddd3a59775dea6d8d49be143fd8e767e2b5 |
File details
Details for the file embed_anything-0.1.8-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: embed_anything-0.1.8-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 9.6 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06fa403f82225ad906770c1252be7c8ceb797865176e42dd1f15e8b0f505b70c |
|
MD5 | eff8c0336effd52bb1823ec075717eae |
|
BLAKE2b-256 | 959fc0cb37c8bb7282bcc7693aba3a3efc3ad03e292b493b1dc43d60a6c7aa11 |
File details
Details for the file embed_anything-0.1.8-cp38-abi3-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: embed_anything-0.1.8-cp38-abi3-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.8+, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ddac9ed98a44126e9e100695ef39cbcb331147f2dbab10afcaa069d3b213dc |
|
MD5 | efc96b4784c935427a0ab416fe658d20 |
|
BLAKE2b-256 | 748dd884d4b45d02c4a47b61a6210fe2fc7bf50285a959506546f1494541490f |