mikeee commited on
Commit
c0ab142
1 Parent(s): 4717551

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -3
README.md CHANGED
@@ -45,8 +45,20 @@ vectorstore.persist()
45
 
46
  ### How to use
47
 
48
- Download the files to a local directory, e.g., `db`
 
 
 
 
 
 
 
 
 
 
 
49
 
 
50
 
51
  ```python
52
  from langchain.embeddings import SentenceTransformerEmbeddings
@@ -56,8 +68,11 @@ from chromadb.config import Settings
56
  model_name = 'paraphrase-multilingual-mpnet-base-v2'
57
  embedding = SentenceTransformerEmbeddings(model_name=model_name)
58
 
59
- path_to_db_parent = '...'
60
- client_settings = Settings(chroma_db_impl="duckdb+parquet", anonymized_telemetry=False, persist_directory=f'{path_to_db_parent}/db')
 
 
 
61
 
62
  db = Chroma(
63
  # persist_directory='docs',
 
45
 
46
  ### How to use
47
 
48
+ Download the `hlm` directory to a local directory, e.g., `db`, for example
49
+ ```python
50
+ from huggingface_hub import snapshot_download
51
+
52
+ snapshot_download(
53
+ repo_id="mikeee/chroma-paraphrase-multilingual-mpnet-base-v2",
54
+ repo_type="dataset",
55
+ allow_patterns="hlm/*",
56
+ local_dir="db",
57
+ resume_download=True,
58
+ )
59
+ ```
60
 
61
+ Load the vectorestore:
62
 
63
  ```python
64
  from langchain.embeddings import SentenceTransformerEmbeddings
 
68
  model_name = 'paraphrase-multilingual-mpnet-base-v2'
69
  embedding = SentenceTransformerEmbeddings(model_name=model_name)
70
 
71
+ client_settings = Settings(
72
+ chroma_db_impl="duckdb+parquet",
73
+ anonymized_telemetry=False,
74
+ persist_directory='db/hlm'
75
+ )
76
 
77
  db = Chroma(
78
  # persist_directory='docs',