diff --git a/console_play.py b/console_play.py index 771406a..f11a3c1 100644 --- a/console_play.py +++ b/console_play.py @@ -34,6 +34,7 @@ def play_unconstrained(): action = input("> ") if action != "": + action = action[0].lower() + action[1:] if action[-1] == "." or action[-1] == "?" or action[-1] == "!": action = action[:-1] diff --git a/generator/ctrl/ctrl_generator.py b/generator/ctrl/ctrl_generator.py index 6f8d934..0c78b3c 100644 --- a/generator/ctrl/ctrl_generator.py +++ b/generator/ctrl/ctrl_generator.py @@ -276,7 +276,7 @@ class CTRLGenerator(): def generate(self, prompt, options=None): prompt = self.prompt_replace(prompt) - debug_print = True + debug_print = False if debug_print: print("\n\n*****DEBUG*****") @@ -315,8 +315,6 @@ class CTRLGenerator(): if debug_print: print(repr(self.idx2word[idx]), end="_") - import pdb - pdb.set_trace() tokens_generated_so_far = ' '.join([self.idx2word[c] for c in tokens_generated[0][len(text):token+2]]) tokens_generated_so_far = re.sub('(@@ )', '', string=tokens_generated_so_far) tokens_generated_so_far = re.sub('(@@ ?$)', '', string=tokens_generated_so_far)