Muhammad Qasim
commited on
Commit
·
2733653
1
Parent(s):
3409dbc
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,8 @@ def get_vectorstore(text_chunks):
|
|
37 |
# embeddings = OpenAIEmbeddings()
|
38 |
print("HuggingFaceInstructEmbeddings")
|
39 |
model_kwargs = {'device': 'cpu', 'weights_only': True}
|
40 |
-
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl", model_kwargs=model_kwargs)
|
|
|
41 |
print("FAISS.from_texts")
|
42 |
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
43 |
print("returning vectorstore")
|
|
|
37 |
# embeddings = OpenAIEmbeddings()
|
38 |
print("HuggingFaceInstructEmbeddings")
|
39 |
model_kwargs = {'device': 'cpu', 'weights_only': True}
|
40 |
+
# embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl", model_kwargs=model_kwargs)
|
41 |
+
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
|
42 |
print("FAISS.from_texts")
|
43 |
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
44 |
print("returning vectorstore")
|