add installation info

这个提交包含在:
qingxu fu
2023-12-07 21:29:41 +08:00
父节点 7bac8f4bd3
当前提交 21bccf69d2
共有 2 个文件被更改,包括 9 次插入5 次删除

查看文件

@@ -199,8 +199,7 @@ class LocalDocQA:
self.vector_store.save_local(vs_path) self.vector_store.save_local(vs_path)
return vs_path, loaded_files return vs_path, loaded_files
else: else:
self.vector_store = FAISS.load_local(vs_path, text2vec) raise RuntimeError("文件加载失败,请检查文件格式是否正确")
return vs_path, loaded_files
def get_loaded_file(self, vs_path): def get_loaded_file(self, vs_path):
ds = self.vector_store.docstore ds = self.vector_store.docstore

查看文件

@@ -2,9 +2,14 @@ from toolbox import CatchException, update_ui, ProxyNetworkActivate, update_ui_l
from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_files_from_everything from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_files_from_everything
install_msg =""" install_msg ="""
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
pip3 install transformers --upgrade 1. python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
pip3 install langchain sentence-transformers unstructured[all-docs] faiss-cpu nltk beautifulsoup4 bitsandbytes tabulate icetk --upgrade
2. python -m pip install transformers protobuf langchain sentence-transformers faiss-cpu nltk beautifulsoup4 bitsandbytes tabulate icetk --upgrade
3. python -m pip install unstructured[all-docs] --upgrade
4. python -c 'import nltk; nltk.download("punkt")'
""" """
@CatchException @CatchException