groqbook

groqbook

Groqbook: Generate entire books in seconds using Groq and Llama3

Stars: 628

Visit
 screenshot

Groqbook is a streamlit app that quickly generates entire books from a one-line prompt using Llama3 on Groq. It focuses on nonfiction books, generating chapters within seconds by utilizing Llama3-8b and Llama3-70b models. The tool currently uses section titles to create chapter content, with plans to expand to full book context for fiction books. Users can download the book contents in a text file, and the app supports markdown styling with tables and code for an aesthetic book display.

README:

License

Groqbook: Generate entire books in seconds using Groq and Llama3

Groqbook is a streamlit app that scaffolds the creation of books from a one-line prompt using Llama3 on Groq. It works well on nonfiction books and generates each chapter within seconds. The app mixes Llama3-8b and Llama3-70b, utilizing the larger model for generating the structure and the smaller of the two for creating the content. Currently, the model only uses the context of the section title to generate the chapter content. In the future, this will be expanded to the fuller context of the book to allow groqbook to generate quality fiction books as well.

Demo of Groqbook

Demo of Groqbook fast generation of book content


Second Part of Demo of Groqbook

Demo of Groqbook downloading markdown-styled book


Features

  • 📖 Scaffolded prompting that strategically switches between Llama3-70b and Llama3-8b to balance speed and quality
  • 🖊️ Uses markdown styling to create an aesthetic book on the streamlit app that includes tables and code
  • 📂 Allows user to download a text file with the entire book contents

Example Generated Books:

Example Prompt
LLM Basics The Basics of Large Language Models
Data Structures and Algorithms Data Structures and Algorithms in Java

Quickstart

[!IMPORTANT] To use Groqbook, you can use the hosted version at groqbook.streamlit.app Alternatively, you can run groqbook locally with streamlit using the quickstart instructions.

Hosted on Streamlit:

To use Groqbook, you can use the hosted version at groqbook.streamlit.app

Run locally:

Alternative, you can run groqbook locally with streamlit.

Step 1

First, you can set your Groq API key in the environment variables:

export GROQ_API_KEY="gsk_yA..."

This is an optional step that allows you to skip setting the Groq API key later in the streamlit app.

Step 2

Next, you can set up a virtual environment and install the dependencies.

python3 -m venv venv
source venv/bin/activate # Bash

venv\Scripts\activate.bat # Windows
pip3 install -r requirements.txt

Step 3 (Windows Only)

It may be required to install gtk3 for users on windows.

https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer?tab=readme-ov-file

Step 4

Finally, you can run the streamlit app.

python3 -m streamlit run main.py

Details

Technologies

  • Streamlit
  • Llama3 on Groq Cloud

Limitations

Groqbook may generate inaccurate information or placeholder content. It should be used to generate books for entertainment purposes only.

Contributing

Improvements through PRs are welcome!

Changelog

v0.2.0

May 29th, 2024:

Demo of Groqbook Statistics

Demo of Groqbook's Generation Statistics

v0.3.0

June 8th, 2024:

Image of New PDF Download Option

Download Books as Styled PDFs

Future Features:

  • Ability to title books which shows on downloads
  • Ability to save books to Google drive
  • Optional seed content field to input existing notes

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for groqbook

Similar Open Source Tools

For similar tasks

For similar jobs