This commit is contained in:
root
2019-11-16 04:37:30 +00:00
parent aa39f5d2ca
commit 039fe7c3b9
2 changed files with 121250 additions and 37194 deletions
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -88,10 +88,10 @@ class SimpleGenerator:
def generate(self, prompt, options=None, seed=1):
debug=True
debug_print=False
prefix = self.prompt_replace(prompt)
if debug:
if debug_print:
print("******DEBUG******")
print("Prompt is: ", repr(prefix))
@@ -134,9 +134,9 @@ class SimpleGenerator:
gen_text = enc.decode(context_tokens[:1]) + gen_text
gen_text = gen_text.lstrip('\n')
gen_texts.append(gen_text)
print("Generated result is: ", repr(gen_texts[0]))
print("******END DEBUG******")
if debug_print:
print("Generated result is: ", repr(gen_texts[0]))
print("******END DEBUG******")
result = gen_texts[0][len(prefix):]
result = self.result_replace(result)