Upload folder using huggingface_hub
Browse files- Test_RAG.py +6 -6
Test_RAG.py
CHANGED
|
@@ -626,12 +626,12 @@ def bot(history, temperature, top_p, top_k, repetition_penalty, hide_full_prompt
|
|
| 626 |
# t1.start()
|
| 627 |
|
| 628 |
# Initialize an empty string to store the generated text
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
history[-1][1] = response
|
| 634 |
-
|
| 635 |
|
| 636 |
|
| 637 |
def request_cancel():
|
|
|
|
| 626 |
# t1.start()
|
| 627 |
|
| 628 |
# Initialize an empty string to store the generated text
|
| 629 |
+
partial_text = ""
|
| 630 |
+
for new_text in streamer:
|
| 631 |
+
partial_text = text_processor(partial_text, new_text)
|
| 632 |
+
history[-1][1] = partial_text
|
| 633 |
+
# history[-1][1] = response
|
| 634 |
+
yield history
|
| 635 |
|
| 636 |
|
| 637 |
def request_cancel():
|