Spaces:
Runtime error
Runtime error
syntax update
Browse files
app.py
CHANGED
@@ -115,12 +115,12 @@ print("################################################################")
|
|
115 |
|
116 |
def chat(file, question):
|
117 |
def get_chunks(text):
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
|
125 |
chunks = text_splitter.split_text(text)
|
126 |
return chunks
|
|
|
115 |
|
116 |
def chat(file, question):
|
117 |
def get_chunks(text):
|
118 |
+
text_splitter = RecursiveCharacterTextSplitter(
|
119 |
+
# seperator = "\n",
|
120 |
+
chunk_size = 250,
|
121 |
+
chunk_overlap = 50,
|
122 |
+
length_function = len,
|
123 |
+
)
|
124 |
|
125 |
chunks = text_splitter.split_text(text)
|
126 |
return chunks
|