diff --git a/applications/DeepSpeed-Chat/inference/chatbot.py b/applications/DeepSpeed-Chat/inference/chatbot.py index 5a4e36895..62e251fb2 100644 --- a/applications/DeepSpeed-Chat/inference/chatbot.py +++ b/applications/DeepSpeed-Chat/inference/chatbot.py @@ -73,6 +73,7 @@ def get_model_response(generator, user_input, max_new_tokens): def process_response(response, num_rounds): output = str(response[0]["generated_text"]) output = output.replace("<|endoftext|>", "") + output = output.replace("<|endoftext|>", "") all_positions = [m.start() for m in re.finditer("Human: ", output)] place_of_second_q = -1 if len(all_positions) > num_rounds: