KingNish commited on
Commit
8dc1546
·
verified ·
1 Parent(s): a0b78eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -95,12 +95,12 @@ def chat_document(file, question):
95
  Question: {question}
96
  Answer:"""
97
 
98
- stream = client.text_generation(message, max_new_tokens=2048, stream=True, details=True, return_full_text=False)
99
  output = ""
100
  for response in stream:
101
  if not response.token.text == "</s>":
102
  output += response.token.text
103
- return output
104
 
105
 
106
  with gr.Blocks() as demo:
 
95
  Question: {question}
96
  Answer:"""
97
 
98
+ stream = client.text_generation(message, max_new_tokens=4096, stream=True, details=True, return_full_text=False)
99
  output = ""
100
  for response in stream:
101
  if not response.token.text == "</s>":
102
  output += response.token.text
103
+ yield output
104
 
105
 
106
  with gr.Blocks() as demo: