Use own copy of embeddings model.
Browse files
app.py
CHANGED
|
@@ -27,7 +27,8 @@ splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE, chunk_overlap=0
|
|
| 27 |
chunks = splitter.split_documents(documents)
|
| 28 |
|
| 29 |
print("Creating database")
|
| 30 |
-
|
|
|
|
| 31 |
db = FAISS.from_documents(chunks, embeddings)
|
| 32 |
|
| 33 |
print("Loading model")
|
|
|
|
| 27 |
chunks = splitter.split_documents(documents)
|
| 28 |
|
| 29 |
print("Creating database")
|
| 30 |
+
# Use own copy of model as a workaround for sentence-transformers' being down.
|
| 31 |
+
embeddings = HuggingFaceEmbeddings(model_name="3gg/all-mpnet-base-v2")
|
| 32 |
db = FAISS.from_documents(chunks, embeddings)
|
| 33 |
|
| 34 |
print("Loading model")
|