calmgoose commited on
Commit
a659f94
1 Parent(s): 9647398

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -7
README.md CHANGED
@@ -7,7 +7,7 @@ task_categories:
7
  - sentence-similarity
8
  language:
9
  - en
10
- pretty_name: Embeddings for Books
11
  tags:
12
  - faiss
13
  - langchain
@@ -27,13 +27,15 @@ Creating these embeddings can take a while so here's a convenient, downloadable
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
 
38
  ```python
39
  import os
@@ -43,11 +45,11 @@ 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
 
 
7
  - sentence-similarity
8
  language:
9
  - en
10
+ pretty_name: FAISS Vector Store of Embeddings for Books
11
  tags:
12
  - faiss
13
  - langchain
 
27
 
28
  ## How to use
29
 
30
+ 1. Specify the book from one of the following:
31
+ - `"1984"`
32
+ - `"The Almanac of Naval Ravikant"`
33
  3. Download data
34
  4. Load to use with LangChain
35
 
36
+ ```
37
  pip install -qqq langchain InstructorEmbedding sentence_transformers faiss-cpu huggingface_hub
38
+ ```
39
 
40
  ```python
41
  import os
 
45
 
46
  # download the vectorstore for the book you want
47
  book="1984"
48
+ cache_dir=f"{book}_cache"
49
+ vectorstore = snapshot_download(repo_id="calmgoose/book-embeddings",
50
  repo_type="dataset",
51
  revision="main",
52
+ allow_patterns=f"books/{book}/*", # to download only the one book
53
  cache_dir=cache_dir,
54
  )
55