A Guide to Generating Fantasy Novels with GPT-Author

Shashi Prakash Gautam
3 min readAug 14, 2023

--

GPT-Author is an innovative tool that allows users to generate original fantasy novels using GPT-4 and the Stable Diffusion API. With just an initial prompt and the desired number of chapters, GPT-Author can create a complete novel in just a few minutes and output it as an EPUB file. In this blog post, we will explore how to run and use this tool to generate your very own fantasy novel.

How it Works?

GPT-Author uses artificial intelligence to generate a list of potential plots based on a given prompt. It then selects the most engaging plot, improves upon it, and extracts a title. Next, it generates a detailed storyline with a specified number of chapters and improves the storyline. Each chapter is then individually written by the AI, following the plot and taking into account the content of previous chapters. Finally, a prompt to design the cover art is generated, and the cover is created. The novel is then compiled into an EPUB file for users to download and read.

Usage

GPT-Author can be run in Google Colab or a local Jupyter notebook. Here’s a step-by-step guide to getting set up and generating your own novel:

Google Colab

  1. Open the GPT-Author notebook in Google Colab.
  2. Add your API keys to the notebook.
  3. Run the cells in order to install the necessary dependencies and generate your novel.
  4. Customize the prompt and number of chapters to generate your own unique novel.

Local Jupyter Notebook

  1. Install the necessary dependencies by running the following command in your terminal:
pip install openai ebooklib requests
  1. Download the GPT-Author notebook from the GitHub repository and open it in your local Jupyter notebook.
  2. Add your API keys to the notebook.
  3. Run the cells in order to generate your novel.
  4. Customize the prompt and number of chapters to generate your own unique novel.

Here’s an example of customizing the prompt and number of chapters:

prompt = "Similar to Percy Jackson or Harry Potter in terms of vibes, but a different plot entirely. Set in modern day. Add some element of technology to it."num_chapters = 20writing_style = "Clear and easily understandable, similar to a young adult novel. Highly descriptive and sometimes long-winded."novel, title, chapters, chapter_titles = write_fantasy_novel(prompt, num_chapters, writing_style)

Note that prompts with fewer than seven chapters may cause issues.

License

GPT-Author is MIT licensed.

Conclusion

With GPT-Author, anyone can generate their own unique fantasy novel with just a few prompts and the click of a button. It’s a powerful tool that uses artificial intelligence to generate compelling stories that are both engaging and unique. Whether you’re a writer looking for inspiration or simply interested in exploring the possibilities of AI-generated content, GPT-Author is a great place to start. Give it a try and let your imagination run wild!

--

--

No responses yet