mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-10 11:40:48 +08:00
Merge branch 'master' of http://github.com/nickwalton/AIDungeon
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user