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 fast generation of book content
Second Part of Demo of Groqbook
Demo of Groqbook downloading markdown-styled book
Example | Prompt |
---|---|
LLM Basics | The Basics of Large Language Models |
Data Structures and Algorithms | Data Structures and Algorithms in Java |
[!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.
To use Groqbook, you can use the hosted version at groqbook.streamlit.app
Alternative, you can run groqbook locally with streamlit.
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.
Next, you can set up a virtual environment and install the dependencies.
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
Finally, you can run the streamlit app.
python3 -m streamlit run main.py
Groqbook may generate inaccurate information or placeholder content. It should be used to generate books for entertainment purposes only.
Improvements through PRs are welcome!
May 29th, 2024:
Demo of Groqbook's Generation Statistics
June 8th, 2024:
Download Books as Styled PDFs