Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -84,6 +84,7 @@ def chat_document(file, question):
|
|
84 |
content = content.replace('\n', ' ')
|
85 |
content = content.replace('\r', ' ')
|
86 |
content = content.replace('\t', ' ')
|
|
|
87 |
content = content.strip()
|
88 |
if len(content) > 32000:
|
89 |
content = content[:32000]
|
@@ -114,6 +115,7 @@ def chat_document_v2(file, question):
|
|
114 |
content = content.replace('\n', ' ')
|
115 |
content = content.replace('\r', ' ')
|
116 |
content = content.replace('\t', ' ')
|
|
|
117 |
content = content.strip()
|
118 |
chunks = split_content(content)
|
119 |
|
|
|
84 |
content = content.replace('\n', ' ')
|
85 |
content = content.replace('\r', ' ')
|
86 |
content = content.replace('\t', ' ')
|
87 |
+
content = content.replace(' ', '')
|
88 |
content = content.strip()
|
89 |
if len(content) > 32000:
|
90 |
content = content[:32000]
|
|
|
115 |
content = content.replace('\n', ' ')
|
116 |
content = content.replace('\r', ' ')
|
117 |
content = content.replace('\t', ' ')
|
118 |
+
content = content.replace(' ', '')
|
119 |
content = content.strip()
|
120 |
chunks = split_content(content)
|
121 |
|