DanTm99 / gpt2-article-generator

An application that uses GPT-2 to generate news articles from user given prompts
56 stars 26 forks source link

Loading checkpoint None Error - FIx please #2

Open srikanthNDM opened 4 years ago

srikanthNDM commented 4 years ago

Getting error: ` None Loading checkpoint None Exception in Tkinter callback Traceback (most recent call last): File "D:\gpt2-article-generator-master\gpt2handler.py", line 65, in load_model gpt2.load_gpt2(self.sess, run_name=self.run_name) File "C:\Users\Sree\AppData\Local\Programs\Python\Python37\lib\site-packages\gpt_2_simple\gpt_2.py", line 399, in load_gpt2 saver.restore(sess, ckpt) File "C:\Users\Sree\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\training\saver.py", line 1277, in restore raise ValueError("Can't load save_path when it is None.") ValueError: Can't load save_path when it is None.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Sree\AppData\Local\Programs\Python\Python37\lib\tkinter__init.py", line 1705, in call__ return self.func(*args) File "D:\gpt2-article-generator-master\gui.py", line 139, in submit words_per_sample) File "D:\gpt2-article-generator-master\generator.py", line 33, in generate_as_tuple return Gpt2Handler.get_instance().generate_as_tuple(title, initial_content, num_samples, num_words) File "D:\gpt2-article-generator-master\gpt2handler.py", line 41, in get_instance cls() File "D:\gpt2-article-generator-master\gpt2handler.py", line 55, in init self.load_model() File "D:\gpt2-article-generator-master\gpt2handler.py", line 68, in load_model gpt2.load_gpt2(sess, run_name=self.run_name) File "C:\Users\Sree\AppData\Local\Programs\Python\Python37\lib\site-packages\gpt_2_simple\gpt_2.py", line 399, in load_gpt2 saver.restore(sess, ckpt) File "C:\Users\Sree\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\training\saver.py", line 1277, in restore raise ValueError("Can't load save_path when it is None.") ValueError: Can't load save_path when it is None. `

DanTm99 commented 4 years ago

What did you do to cause this error to appear?

neliobnjr commented 3 years ago

Hey guys I got this error: Exception: Model is missing. Place '124M_article_generator_model' in the checkpoint folder and try again.

DanTm99 commented 3 years ago

Hey guys I got this error: Exception: Model is missing. Place '124M_article_generator_model' in the checkpoint folder and try again.

You can download the model from the Google Drive link in the readme.

Sba-Stuff commented 3 years ago

I downloaded model from Google drive. Yet it tries to download from internet why???? I don't have good internet home, i downloaded from internet cafe. Did you hardcoded paths? image

image

image

Tried everything, didn't worked.

DanTm99 commented 3 years ago

I downloaded model from Google drive. Yet it tries to download from internet why???? I don't have good internet home, i downloaded from internet cafe. Did you hardcoded paths?

The model downloaded from Google Drive is a custom model that has been specialised for the use of this program. The model that is downloaded automatically is the base model, and is still required when using the custom model to generate text.

Sba-Stuff commented 3 years ago

Please add this in ReadMe.MD, to clarify to others. Thanks.