Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update auditqa/doc_process.py
Browse files- auditqa/doc_process.py +2 -2
auditqa/doc_process.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
from langchain.text_splitter import RecursiveCharacterTextSplitter, SentenceTransformersTokenTextSplitter
|
4 |
from transformers import AutoTokenizer
|
5 |
from langchain_community.document_loaders import PyMuPDFLoader
|
6 |
-
from
|
7 |
from langchain_community.vectorstores import Qdrant
|
8 |
path_to_data = "./data/"
|
9 |
|
@@ -48,7 +48,7 @@ def process_pdf():
|
|
48 |
)
|
49 |
|
50 |
qdrant_collections = {}
|
51 |
-
for file,value in all_documents:
|
52 |
qdrant_collections[file] = Qdrant.from_documents(
|
53 |
value,
|
54 |
embeddings,
|
|
|
3 |
from langchain.text_splitter import RecursiveCharacterTextSplitter, SentenceTransformersTokenTextSplitter
|
4 |
from transformers import AutoTokenizer
|
5 |
from langchain_community.document_loaders import PyMuPDFLoader
|
6 |
+
from langchain_community.embeddings import HuggingFaceEmbeddings
|
7 |
from langchain_community.vectorstores import Qdrant
|
8 |
path_to_data = "./data/"
|
9 |
|
|
|
48 |
)
|
49 |
|
50 |
qdrant_collections = {}
|
51 |
+
for file,value in all_documents.items():
|
52 |
qdrant_collections[file] = Qdrant.from_documents(
|
53 |
value,
|
54 |
embeddings,
|