Giter Club home page Giter Club logo

Comments (4)

yanqiangmiffy avatar yanqiangmiffy commented on June 12, 2024

已修复

config = LangChainCFG()
application = LangChainApplication(config)

application.source_service.init_source_vector()

from chinese-langchain.

lanybass avatar lanybass commented on June 12, 2024

https://huggingface.co/spaces/ChallengeHub/Chinese-LangChain
在线demo也是加载失败

from chinese-langchain.

yandun72 avatar yandun72 commented on June 12, 2024

我也是

from chinese-langchain.

nmww avatar nmww commented on June 12, 2024

python app.py
No compiled kernel found.
Compiling kernels : /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.c -shared -o /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.so
Kernels compiled : /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.so
Load kernel : /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.so
Setting CPU quantization kernel threads to 16
Using quantization cache
Applying quantization to glm layers
No sentence-transformers model found with name /root/.cache/torch/sentence_transformers/GanymedeNil_text2vec-large-chinese. Creating a new one with MEAN pooling.
姚明.txt
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /root/Chinese-LangChain/app.py:25 in │
│ │
│ 22 │
│ 23 config = LangChainCFG() │
│ 24 application = LangChainApplication(config) │
│ ❱ 25 application.source_service.init_source_vector() │
│ 26 │
│ 27 │
│ 28 def get_file_list(): │
│ │
│ /root/Chinese-LangChain/clc/source_service.py:39 in init_source_vector │
│ │
│ 36 │ │ │ if doc.endswith('.txt'): │
│ 37 │ │ │ │ print(doc) │
│ 38 │ │ │ │ loader = UnstructuredFileLoader(f'{self.docs_path}/{doc}', mode="element │
│ ❱ 39 │ │ │ │ doc = loader.load() │
│ 40 │ │ │ │ docs.extend(doc) │
│ 41 │ │ self.vector_store = FAISS.from_documents(docs, self.embeddings) │
│ 42 │ │ self.vector_store.save_local(self.vector_store_path) │
│ │
│ /root/miniconda3/lib/python3.8/site-packages/langchain/document_loaders/unstructured.py:61 in │
│ load │
│ │
│ 58 │ │
│ 59 │ def load(self) -> List[Document]: │
│ 60 │ │ """Load file.""" │
│ ❱ 61 │ │ elements = self._get_elements() │
│ 62 │ │ if self.mode == "elements": │
│ 63 │ │ │ docs: List[Document] = list() │
│ 64 │ │ │ for element in elements: │
│ │
│ /root/miniconda3/lib/python3.8/site-packages/langchain/document_loaders/unstructured.py:93 in │
│ _get_elements │
│ │
│ 90 │ │ super().init(mode=mode, **unstructured_kwargs) │
│ 91 │ │
│ 92 │ def _get_elements(self) -> List: │
│ ❱ 93 │ │ from unstructured.partition.auto import partition │
│ 94 │ │ │
│ 95 │ │ return partition(filename=self.file_path, **self.unstructured_kwargs) │
│ 96 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'unstructured.partition.auto'
root@autodl-container-ebe411a150-49ec68c6:/Chinese-LangChain# python app.py
No compiled kernel found.
Compiling kernels : /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.c -shared -o /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.so
Kernels compiled : /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.so
Load kernel : /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a756e07698483872c5c070eee/quantization_kernels_parallel.so
Setting CPU quantization kernel threads to 16
Using quantization cache
Applying quantization to glm layers
No sentence-transformers model found with name /root/.cache/torch/sentence_transformers/GanymedeNil_text2vec-large-chinese. Creating a new one with MEAN pooling.
王治郅.txt
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /root/Chinese-LangChain/app.py:36 in │
│ │
│ 33 │
│ 34 │
│ 35 file_list = get_file_list() │
│ ❱ 36 application.source_service.init_source_vector() │
│ 37 │
│ 38 def upload_file(file): │
│ 39 │ if not os.path.exists("docs"): │
│ │
│ /root/Chinese-LangChain/clc/source_service.py:39 in init_source_vector │
│ │
│ 36 │ │ │ if doc.endswith('.txt'): │
│ 37 │ │ │ │ print(doc) │
│ 38 │ │ │ │ loader = UnstructuredFileLoader(f'{self.docs_path}/{doc}', mode="element │
│ ❱ 39 │ │ │ │ doc = loader.load() │
│ 40 │ │ │ │ docs.extend(doc) │
│ 41 │ │ self.vector_store = FAISS.from_documents(docs, self.embeddings) │
│ 42 │ │ self.vector_store.save_local(self.vector_store_path) │
│ │
│ /root/miniconda3/lib/python3.8/site-packages/langchain/document_loaders/unstructured.py:61 in │
│ load │
│ │
│ 58 │ │
│ 59 │ def load(self) -> List[Document]: │
│ 60 │ │ """Load file.""" │
│ ❱ 61 │ │ elements = self._get_elements() │
│ 62 │ │ if self.mode == "elements": │
│ 63 │ │ │ docs: List[Document] = list() │
│ 64 │ │ │ for element in elements: │
│ │
│ /root/miniconda3/lib/python3.8/site-packages/langchain/document_loaders/unstructured.py:93 in │
│ _get_elements │
│ │
│ 90 │ │ super().init(mode=mode, **unstructured_kwargs) │
│ 91 │ │
│ 92 │ def _get_elements(self) -> List: │
│ ❱ 93 │ │ from unstructured.partition.auto import partition │
│ 94 │ │ │
│ 95 │ │ return partition(filename=self.file_path, **self.unstructured_kwargs) │
│ 96 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'unstructured.partition.auto'
root@autodl-container-ebe411a150-49ec68c6:
/Chinese-LangChain#

from chinese-langchain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.