added the embeddings part (#8805)

Description: forgot to add the embeddings part in the documentation.
sorry 😅

@baskaryan
pull/8807/head
Bal Narendra Sapa 1 year ago committed by GitHub
parent 9b86235a56
commit a22d502248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -269,6 +269,20 @@
"pkl = db.serialize_to_bytes() # serializes the faiss index"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eb083247",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"outputs": [],
"source": [
"embeddings = HuggingFaceEmbeddings(model_name=\"all-MiniLM-L6-v2\")"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -276,7 +290,7 @@
"metadata": {},
"outputs": [],
"source": [
"db = FAISS.deserialize_from_bytes(pkl) # Load the index"
"db = FAISS.deserialize_from_bytes(embeddings = embeddings, serialized = pkl) # Load the index"
]
},
{

Loading…
Cancel
Save