calmgoose commited on
Commit
bbf9087
1 Parent(s): faa0912

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -5
README.md CHANGED
@@ -16,7 +16,9 @@ tags:
16
  - books
17
  - LLM
18
  ---
19
- # Vector store of embeddings for the book "1984" by George Orwell
 
 
20
 
21
  This is a [faiss](https://github.com/facebookresearch/faiss) vector store created with [instructor embeddings](https://github.com/HKUNLP/instructor-embedding) using [LangChain](https://langchain.readthedocs.io/en/latest/modules/indexes/examples/embeddings.html#instructembeddings) . Use it for similarity search, question answering or anything else that leverages embeddings! 😃
22
 
@@ -25,8 +27,11 @@ Creating these embeddings can take a while so here's a convenient, downloadable
25
 
26
  ## How to use
27
 
28
- 1. Download data
29
- 2. Load to use with LangChain
 
 
 
30
 
31
  pip install -qqq langchain InstructorEmbedding sentence_transformers faiss-cpu huggingface_hub
32
 
@@ -36,12 +41,13 @@ from langchain.embeddings import HuggingFaceInstructEmbeddings
36
  from langchain.vectorstores.faiss import FAISS
37
  from huggingface_hub import snapshot_download
38
 
39
- # download the `vectorstore` folder
 
40
  cache_dir="orwell_faiss"
41
  vectorstore = snapshot_download(repo_id="calmgoose/orwell-1984_faiss-instructembeddings",
42
  repo_type="dataset",
43
  revision="main",
44
- allow_patterns="vectorstore/*",
45
  cache_dir=cache_dir,
46
  )
47
 
 
16
  - books
17
  - LLM
18
  ---
19
+ # Vector store of embeddings for books
20
+ - **"1984" by George Orwell**
21
+ - **"The Almanac of Naval Ravikant" by Eric Jorgenson**
22
 
23
  This is a [faiss](https://github.com/facebookresearch/faiss) vector store created with [instructor embeddings](https://github.com/HKUNLP/instructor-embedding) using [LangChain](https://langchain.readthedocs.io/en/latest/modules/indexes/examples/embeddings.html#instructembeddings) . Use it for similarity search, question answering or anything else that leverages embeddings! 😃
24
 
 
27
 
28
  ## How to use
29
 
30
+ 1. Specify the book
31
+ - `1984`
32
+ - `The Almanac of Naval Ravikant`
33
+ 3. Download data
34
+ 4. Load to use with LangChain
35
 
36
  pip install -qqq langchain InstructorEmbedding sentence_transformers faiss-cpu huggingface_hub
37
 
 
41
  from langchain.vectorstores.faiss import FAISS
42
  from huggingface_hub import snapshot_download
43
 
44
+ # download the vectorstore for the book you want
45
+ book="1984"
46
  cache_dir="orwell_faiss"
47
  vectorstore = snapshot_download(repo_id="calmgoose/orwell-1984_faiss-instructembeddings",
48
  repo_type="dataset",
49
  revision="main",
50
+ allow_patterns=f"books/{book}/*",
51
  cache_dir=cache_dir,
52
  )
53