Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
| 99 |
output = ""
|
| 100 |
for response in stream:
|
| 101 |
if not response.token.text == "</s>":
|
| 102 |
output += response.token.text
|
| 103 |
-
|
| 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:
|