Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ class QQQSplitter(RecursiveCharacterTextSplitter):
|
|
52 |
def __init__(self):
|
53 |
super().__init__()
|
54 |
|
55 |
-
def split(self,
|
56 |
"""
|
57 |
Splits the given text whenever there is a "qqq" sequence.
|
58 |
"""
|
@@ -99,14 +99,14 @@ def load_txt(path="./a.cv.ckaller.2024.txt"):
|
|
99 |
|
100 |
######
|
101 |
# split the document into chunks
|
102 |
-
|
103 |
chunk_size=1500,
|
104 |
chunk_overlap=250,
|
105 |
length_function=len,
|
106 |
is_separator_regex=False,
|
107 |
)
|
108 |
-
__document_chunks =
|
109 |
-
|
110 |
|
111 |
#######
|
112 |
'''
|
|
|
52 |
def __init__(self):
|
53 |
super().__init__()
|
54 |
|
55 |
+
def split(self,text):
|
56 |
"""
|
57 |
Splits the given text whenever there is a "qqq" sequence.
|
58 |
"""
|
|
|
99 |
|
100 |
######
|
101 |
# split the document into chunks
|
102 |
+
''' __text_splitter = QQQSplitter(
|
103 |
chunk_size=1500,
|
104 |
chunk_overlap=250,
|
105 |
length_function=len,
|
106 |
is_separator_regex=False,
|
107 |
)
|
108 |
+
__document_chunks = __text_splitter.split(document)
|
109 |
+
'''
|
110 |
|
111 |
#######
|
112 |
'''
|