From 0a7acb3bd9217b8d38e35679cb3911aaa07ba864 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 13 Mar 2023 00:12:21 -0300 Subject: [PATCH] Remove redundant comments --- modules/chat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/chat.py b/modules/chat.py index 47398af..d78278c 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -127,7 +127,6 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical prompt = custom_generate_chat_prompt(text, max_new_tokens, name1, name2, context, chat_prompt_size) if not regenerate: - # Display user input and "*is typing...*" imediately yield shared.history['visible']+[[visible_text, '*Is typing...*']] # Generate @@ -168,10 +167,8 @@ def impersonate_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typ prompt = generate_chat_prompt(text, max_new_tokens, name1, name2, context, chat_prompt_size, impersonate=True) - # Display "*is typing...*" imediately - yield '*Is typing...*' - reply = '' + yield '*Is typing...*' for i in range(chat_generation_attempts): for reply in generate_reply(prompt+reply, max_new_tokens, do_sample, temperature, top_p, typical_p, repetition_penalty, top_k, min_length, no_repeat_ngram_size, num_beams, penalty_alpha, length_penalty, early_stopping, eos_token=eos_token, stopping_string=f"\n{name2}:"): reply, next_character_found = extract_message_from_reply(prompt, reply, name1, name2, check, impersonate=True)