".github/vscode:/vscode.git/clone" did not exist on "9ba0e63399496f8ee3fcff56c976c92d694668ee"
Unverified Commit 61674333 authored by Thomas Wolf's avatar Thomas Wolf Committed by GitHub
Browse files

Merge pull request #462 from 8enmann/master

fix run_gpt2.py
parents 2cdfb8b2 fd8a3556
......@@ -83,7 +83,8 @@ def run_model():
elif args.length > model.config.n_ctx:
raise ValueError("Can't get samples longer than window size: %s" % model.config.n_ctx)
while not args.unconditional:
while True:
context_tokens = []
if not args.unconditional:
raw_text = input("Model prompt >>> ")
while not raw_text:
......@@ -106,6 +107,8 @@ def run_model():
print("=" * 40 + " SAMPLE " + str(generated) + " " + "=" * 40)
print(text)
print("=" * 80)
if args.unconditional:
break
if __name__ == '__main__':
run_model()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment