Spaces:
Runtime error
Runtime error
Commit
·
0d20107
1
Parent(s):
217f9ad
Tests langchain
Browse files
app.py
CHANGED
@@ -15,11 +15,18 @@ import asyncio
|
|
15 |
import nest_asyncio
|
16 |
nest_asyncio.apply()
|
17 |
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
text_splitter = CharacterTextSplitter()
|
25 |
split_documents_NIST = text_splitter.split_texts(documents_NIST)
|
|
|
15 |
import nest_asyncio
|
16 |
nest_asyncio.apply()
|
17 |
|
18 |
+
from langchain_community.document_loaders import PyMuPDFLoader
|
19 |
|
20 |
+
filepath_NIST = "data/NIST.AI.600-1.pdf"
|
21 |
+
filepath_Blueprint = "data/Blueprint-for-an-AI-Bill-of-Rights.pdf"
|
22 |
+
|
23 |
+
documents_NIST = PyMuPDFLoader(filepath_NIST).load()
|
24 |
+
documents_Blueprint = PyMuPDFLoader(filepath_Blueprint).load()
|
25 |
+
|
26 |
+
# pdf_loader_NIST = PDFFileLoader("data/NIST.AI.600-1.pdf")
|
27 |
+
# pdf_loader_Blueprint = PDFFileLoader("data/Blueprint-for-an-AI-Bill-of-Rights.pdf")
|
28 |
+
# documents_NIST = pdf_loader_NIST.load_documents()
|
29 |
+
# documents_Blueprint = pdf_loader_Blueprint.load_documents()
|
30 |
|
31 |
text_splitter = CharacterTextSplitter()
|
32 |
split_documents_NIST = text_splitter.split_texts(documents_NIST)
|