From f8d95069a423f7c9125427f77be716f9208cba3e Mon Sep 17 00:00:00 2001 From: Parveen Kumar <89995648+parveen232@users.noreply.github.com> Date: Mon, 13 May 2024 16:29:58 +0530 Subject: [PATCH] feat: streaming (#37) --- webui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui.py b/webui.py index e2d403f..6c88c56 100644 --- a/webui.py +++ b/webui.py @@ -203,11 +203,11 @@ def loadModelFromChatTab(repo_id): def bot(history): print("Question: ", history[-1][0]) - output = llm_chain.invoke({"question": history[-1][0]}) + output = llm_chain.stream(history[-1][0]) print("stream:", output) history[-1][1] = "" for character in output: - print(character) + # print(character) history[-1][1] += character yield history