Update pages/bot.py
Browse files- pages/bot.py +4 -4
pages/bot.py
CHANGED
@@ -48,8 +48,8 @@ def create_vectorstore_and_store():
|
|
48 |
folder_path = './files'
|
49 |
pdf_text = get_pdf_text(folder_path)
|
50 |
text_chunks = get_text_chunks(pdf_text)
|
51 |
-
|
52 |
-
embeddings = HuggingFaceInstructEmbeddings(model_name="aari1995/German_Semantic_STS_V2")
|
53 |
# Initiate Faiss DB
|
54 |
vectorstoreDB = FAISS.from_texts(texts=text_chunks,embedding=embeddings)#texts=text_chunks,
|
55 |
# Verzeichnis in dem die VektorDB gespeichert werden soll
|
@@ -62,8 +62,8 @@ def create_vectorstore_and_store():
|
|
62 |
########
|
63 |
|
64 |
def get_vectorstore():
|
65 |
-
|
66 |
-
embeddings = HuggingFaceInstructEmbeddings(model_name="aari1995/German_Semantic_STS_V2")
|
67 |
#Abruf lokaler Vektordatenbank
|
68 |
save_directory = "Store"
|
69 |
vectorstoreDB = FAISS.load_local(save_directory, embeddings)
|
|
|
48 |
folder_path = './files'
|
49 |
pdf_text = get_pdf_text(folder_path)
|
50 |
text_chunks = get_text_chunks(pdf_text)
|
51 |
+
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-base")
|
52 |
+
#embeddings = HuggingFaceInstructEmbeddings(model_name="aari1995/German_Semantic_STS_V2")
|
53 |
# Initiate Faiss DB
|
54 |
vectorstoreDB = FAISS.from_texts(texts=text_chunks,embedding=embeddings)#texts=text_chunks,
|
55 |
# Verzeichnis in dem die VektorDB gespeichert werden soll
|
|
|
62 |
########
|
63 |
|
64 |
def get_vectorstore():
|
65 |
+
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-base")
|
66 |
+
#embeddings = HuggingFaceInstructEmbeddings(model_name="aari1995/German_Semantic_STS_V2")
|
67 |
#Abruf lokaler Vektordatenbank
|
68 |
save_directory = "Store"
|
69 |
vectorstoreDB = FAISS.load_local(save_directory, embeddings)
|