Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,14 @@ import chainlit as cl
|
|
22 |
load_dotenv()
|
23 |
|
24 |
|
25 |
-
document = PyMuPDFLoader(file_path="
|
26 |
|
27 |
|
28 |
|
29 |
def metadata_generator(document, name):
|
30 |
fixed_text_splitter = RecursiveCharacterTextSplitter(
|
31 |
-
chunk_size=
|
32 |
-
chunk_overlap=
|
33 |
separators=["\n\n", "\n", ".", "!", "?"]
|
34 |
)
|
35 |
collection = fixed_text_splitter.split_documents(document)
|
|
|
22 |
load_dotenv()
|
23 |
|
24 |
|
25 |
+
document = PyMuPDFLoader(file_path="https://hiddenhistorycenter.org/wp-content/uploads/2016/10/PropagandaPersuasion2012.pdf").load()
|
26 |
|
27 |
|
28 |
|
29 |
def metadata_generator(document, name):
|
30 |
fixed_text_splitter = RecursiveCharacterTextSplitter(
|
31 |
+
chunk_size=1000,
|
32 |
+
chunk_overlap=200,
|
33 |
separators=["\n\n", "\n", ".", "!", "?"]
|
34 |
)
|
35 |
collection = fixed_text_splitter.split_documents(document)
|