From 4cd64933bb0c10ccabb096b32183cd327f8eba6b Mon Sep 17 00:00:00 2001 From: jaymody Date: Sat, 28 Jan 2023 19:43:17 +0100 Subject: [PATCH] Bug fix. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 17ba70f..ea521b6 100644 --- a/main.py +++ b/main.py @@ -83,10 +83,10 @@ def main(prompt, models_dir, model_size, n_tokens_to_generate): assert model_size in ["124M", "355M", "774M", "1558M"] model_dir = os.path.join(models_dir, model_size) - tf_ckpt_path = tf.train.latest_checkpoint(model_dir) if not os.path.isdir(model_dir): os.makedirs(model_dir) download_gpt2_files(model_size, model_dir) + tf_ckpt_path = tf.train.latest_checkpoint(model_dir) with open(os.path.join(model_dir, "hparams.json")) as file: hparams = json.load(file)