Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,6 +62,8 @@ async def on_chat_start():
|
|
62 |
sentence_blueprint = metadata_generator(ai_blueprint_document, "AI Blueprint", sentence_text_splitter)
|
63 |
|
64 |
sentence_combined_documents = sentence_framework + sentence_blueprint
|
|
|
|
|
65 |
|
66 |
# Initialize the custom embedding class
|
67 |
embedding_model = SentenceTransformerEmbedding('Cheselle/finetuned-arctic-sentence')
|
@@ -69,7 +71,7 @@ async def on_chat_start():
|
|
69 |
# Create the Qdrant vector store using the custom embedding model
|
70 |
sentence_vectorstore = Qdrant.from_documents(
|
71 |
documents=sentence_combined_documents,
|
72 |
-
|
73 |
location=":memory:",
|
74 |
collection_name="AI Policy"
|
75 |
)
|
|
|
62 |
sentence_blueprint = metadata_generator(ai_blueprint_document, "AI Blueprint", sentence_text_splitter)
|
63 |
|
64 |
sentence_combined_documents = sentence_framework + sentence_blueprint
|
65 |
+
from langchain_community.embeddings import HuggingFaceEmbeddings # Use HuggingFaceEmbeddings if needed
|
66 |
+
|
67 |
|
68 |
# Initialize the custom embedding class
|
69 |
embedding_model = SentenceTransformerEmbedding('Cheselle/finetuned-arctic-sentence')
|
|
|
71 |
# Create the Qdrant vector store using the custom embedding model
|
72 |
sentence_vectorstore = Qdrant.from_documents(
|
73 |
documents=sentence_combined_documents,
|
74 |
+
embedding_function=embedding_model, # Ensure this is an instance
|
75 |
location=":memory:",
|
76 |
collection_name="AI Policy"
|
77 |
)
|