update webui.py
This commit is contained in:
parent
5c3497912c
commit
8c469fda31
|
|
@ -80,7 +80,7 @@ class LocalDocQA:
|
||||||
vector_store = FAISS.from_documents(docs, self.embeddings)
|
vector_store = FAISS.from_documents(docs, self.embeddings)
|
||||||
vs_path = f"""./vector_store/{os.path.splitext(file)[0]}_FAISS_{datetime.datetime.now().strftime("%Y%m%d_%H%M%S")}"""
|
vs_path = f"""./vector_store/{os.path.splitext(file)[0]}_FAISS_{datetime.datetime.now().strftime("%Y%m%d_%H%M%S")}"""
|
||||||
vector_store.save_local(vs_path)
|
vector_store.save_local(vs_path)
|
||||||
return vs_path
|
return vs_path if len(docs)>0 else None
|
||||||
|
|
||||||
def get_knowledge_based_answer(self,
|
def get_knowledge_based_answer(self,
|
||||||
query,
|
query,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue