KingNish commited on
Commit
1b1f81e
·
verified ·
1 Parent(s): 08339e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -77,7 +77,10 @@ def chat_document(file, question):
77
  content = str(read_document(file))
78
  if len(content) > 64000:
79
  content = content[:64000]
80
-
 
 
 
81
 
82
  # Define system prompt for the chat API
83
  system_prompt = """
 
77
  content = str(read_document(file))
78
  if len(content) > 64000:
79
  content = content[:64000]
80
+ content = content.replace('\n', ' ')
81
+ content = content.replace('\r', ' ')
82
+ content = content.replace('\t', ' ')
83
+ content = content.strip()
84
 
85
  # Define system prompt for the chat API
86
  system_prompt = """