Infinite Bookshelf: A New Way to Create Books
Overview
Infinite Bookshelf is an innovative application that simplifies the creation of books, all from a single line of input. It leverages the power of Llama3 models on the Groq platform to generate comprehensive books in mere seconds. Primarily designed for nonfiction content, this app efficiently produces structured chapters and content. By utilizing two variants of the Llama3 model—Llama3-70b for structuring and Llama3-8b for content generation—Infinite Bookshelf ensures a balance between speed and quality. Although its current design is optimized for nonfiction, there are plans to enhance its capabilities for fiction content generation by considering a broader context of the book.
Features
- Scaffolded Prompting: Infinite Bookshelf tactically alternates between two models, Llama3-70b and Llama3-8b, ensuring rapid generation of content without sacrificing quality.
- Markdown Styling: The application formats generated content aesthetically in markdown, supporting the inclusion of tables and code snippets, enhancing readability and utility.
- Downloadable Content: Users have the option to download generated books as text files, allowing for easy sharing and printing.
Example Generated Books
Two examples demonstrate the app's capability:
- "LLM Basics," created from the prompt about the basics of large language models.
- "Data Structures and Algorithms," formulated from a prompt about learning these concepts in Java.
Quickstart Guide
Using Infinite Bookshelf is straightforward, either through a hosted version or locally on one's system.
Hosted Version
Access the application online at infinite.benjamin.sh for immediate use.
Running Locally
For those interested in local use, follow these steps:
-
Set API Key: Optionally set the Groq API key as an environment variable for convenience.
export GROQ_API_KEY="your_api_key_here"
-
Set Up Environment: Create a virtual environment and install necessary dependencies.
python3 -m venv venv source venv/bin/activate # For Bash venv\Scripts\activate.bat # For Windows pip3 install -r requirements.txt
-
Windows Specific Requirements: Install gtk3 if you're using Windows.
- Follow this installer guide.
-
Run Application: Launch the streamlit app.
python3 -m streamlit run main.py
Technologies Used
Infinite Bookshelf is built using Streamlit, with backend processing on Groq Cloud using Llama3 models.
Limitations
While Infinite Bookshelf is powerful, it may occasionally generate inaccurate information or placeholder content. It's best utilized for entertainment and inspiration rather than authoritative publication.
Contributing
The project welcomes contributions. Those interested in improving the app can submit pull requests.
Recent Updates and Future Features
Recent Updates:
- v0.2.0 (May 29, 2024): Added new inference statistics.
- v0.3.0 (June 8, 2024): Introduced download books as styled PDFs option.
Future Plans:
- Features allowing users to title books for downloads.
- Options to save books directly to Google Drive.
- An input field for incorporating existing notes.
Infinite Bookshelf represents a step forward in personalized and rapid book creation, paving the way for more tailored learning experiences and creative endeavors.