File size: 569 Bytes
1ffbd53
 
 
 
ba83567
1ffbd53
ba83567
1ffbd53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## To use the vector store :
# STEP: I - Download the entire repo (this includes the folder)

```
from huggingface_hub import snapshot_download
repo_id = "sanketsans/Breaking-Bad"
snapshot_download(repo_id=repo_id,local_dir=local_dir,repo_type="dataset")
```


# STEP: II - Import FAISS and load the indexes

```
from langchain_community.vectorstores import FAISS

vector_store = FAISS.load_local(
    "faiss_index", embeds, allow_dangerous_deserialization=True
)
```

# STEP: III - Use as retriver / similarity search**
```
retriever = vector_store.as_retriever()
```