KingNish commited on
Commit
431526e
·
verified ·
1 Parent(s): fef954a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -92,10 +92,11 @@ def chat_document(file, question):
92
  Question: {question}
93
  Answer:"""
94
 
95
- stream = client.text_generation(message, max_new_tokens=512, stream=True, details=True, return_full_text=False)
96
  output = ""
97
  for response in stream:
98
- output += response.token.text
 
99
  return output
100
 
101
 
 
92
  Question: {question}
93
  Answer:"""
94
 
95
+ stream = client.text_generation(message, max_new_tokens=2048, stream=True, details=True, return_full_text=False)
96
  output = ""
97
  for response in stream:
98
+ if not response.token.text == "</s>":
99
+ output += response.token.text
100
  return output
101
 
102