Muhammad Qasim
commited on
Commit
·
f89d622
1
Parent(s):
047284f
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,8 +35,11 @@ def get_text_chunks(text):
|
|
| 35 |
|
| 36 |
def get_vectorstore(text_chunks):
|
| 37 |
# embeddings = OpenAIEmbeddings()
|
|
|
|
| 38 |
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
|
|
|
|
| 39 |
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
|
|
|
| 40 |
return vectorstore
|
| 41 |
|
| 42 |
|
|
|
|
| 35 |
|
| 36 |
def get_vectorstore(text_chunks):
|
| 37 |
# embeddings = OpenAIEmbeddings()
|
| 38 |
+
print("HuggingFaceInstructEmbeddings")
|
| 39 |
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
|
| 40 |
+
print("FAISS.from_texts")
|
| 41 |
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
| 42 |
+
print("returning vectorstore")
|
| 43 |
return vectorstore
|
| 44 |
|
| 45 |
|