Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sonam-pankaj95 authored Apr 15, 2024
1 parent c58585f commit 68719ba
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,44 @@ pip install embed-anything`



## :astronaut: Getting Started
# Requirements for OpenAI
1. Please check if you already have the OpenAI key in the Environment variable. We have only released the OpenAI embedder library so far. Please stay tuned for updates for the local embeddings as well.
# :astronaut: Getting Started

### If you are using embed-anything==0.1.4 version
## For local models or multimodal Embedding

```python
import embed_anything
from embed_anything import EmbedData
data = embed_anything.embed_file("filename.pdf")
```
### if you are using embed-anything==0.1.7 version
### To use local embedding: we support Allmini or Bert, and Jina

```python
import embed_anything
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "OpenAI")
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "Jina")
embeddings = np.array([data.embedding for data in data])
```

# For local models or multimodal Embedding

## To use local embedding: we support Allmini or Bert, and Jina
### To use multimodal embedding: we support CLIP

```python
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "Jina")
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "Clip")
embeddings = np.array([data.embedding for data in data])
```


## To use multimodal embedding: we support CLIP
## For OpenAI
1. Please check if you already have the OpenAI key in the Environment variable. We have only released the OpenAI embedder library so far. Please stay tuned for updates for the local embeddings as well.

### if you are using embed-anything==0.1.7 version (latest version)

```python
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "Clip")
import embed_anything
data:list[EmbedData] = embed_anything.embed_file("filename.pdf", embeder= "OpenAI")
embeddings = np.array([data.embedding for data in data])
```

### If you are using embed-anything==0.1.4 version

```python
import embed_anything
from embed_anything import EmbedData
data = embed_anything.embed_file("filename.pdf")
```



Expand All @@ -81,7 +83,7 @@ embeddings = np.array([data.embedding for data in data])



# Contributing to EmbedAnything
# 🚧 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. 🚀
Expand Down

0 comments on commit 68719ba

Please sign in to comment.