mikavehns/BookGPT

getting error when generating the book

tahany91 opened this issue · 1 comments

Generating a book with 2 chapters, 200 words per chapter, topic "How can I stay motivated" and category "SelfImprovement" in english.
Initializing..
Traceback (most recent call last):
File "C:\Users\adria\BookGPT\src\run.py", line 121, in
main()
File "C:\Users\adria\BookGPT\src\run.py", line 93, in main
book = Book(chapters, words, topic, category, language)
File "C:\Users\adria\BookGPT\src\book.py", line 56, in init
self.structure = self.get_structure()
File "C:\Users\adria\BookGPT\src\book.py", line 167, in get_structure
word_count = paragraph.split('---')[1]
IndexError: list index out of range

This error occurs, when gpt-3 does not adhere to the format templates (Happens maybe 1 in 500 generations). Just regenerate with the same attributes. In the near future I will add fine tuning to the bot, so that these errors don't happen.

Hope this helps!