BookGist is an AI-powered tool that delivers concise and insightful summaries of books, chapter by chapter. Whether you're a student, professional, or an avid reader, BookGist helps you grasp the core ideas quickly, saving you time and enhancing your understanding without compromising the depth of the original content.
- Save Time: Get to the heart of a book without reading it cover to cover.
- Enhance Understanding: Reinforce knowledge by summarizing key points.
- Focus on What's Important: Skip unnecessary details and focus on essential insights.
- Flexible Reading: Ideal for reviewing material or catching up on readings.
- Chapter-wise Summarization: Generates summaries for each chapter, allowing you to focus on specific sections.
- Whole Book Summarization: For books without chapters, BookGist condenses the entire text into a comprehensive summary.
- Advanced NLP Techniques: Utilizes cutting-edge Natural Language Processing models to extract meaningful information.
- User-Friendly Interface: Accessible to users of all technical backgrounds with a clean and intuitive design.
- Email Delivery Option: Receive your summaries directly in your inbox for convenience.
BookGist leverages the T5-small pretrained model from HuggingFace Transformers to generate accurate and coherent summaries. Here's a breakdown of the process:
- Text Segmentation: The input book (in PDF format) is divided into chunks based on chapters. If the book lacks chapters, it's treated as a single chunk.
- Tokenization: Each chunk is tokenized using the
T5Tokenizerto prepare it for the model. - Summary Generation: The tokenized text is fed into the
T5ForConditionalGenerationmodel, which generates summarized content. - Decoding: The output tokens are decoded back into human-readable text using the
decode()function ofT5Tokenizer. - Compilation: All summarized chunks are compiled into a final summary document.
- Python 3.x
- Pip (Python package installer)
-
Clone the Repository
git clone https://github.com/loganreedd/BookGist.git
-
Navigate to the Project Directory
cd BookGist -
Install Dependencies
Install all required Python packages using:
pip install -r requirements.txt
To run BookGist via the command line:
python3 summarizer_cli.py --path <path-to-your-PDF-file> - Replace
<path-to-your-PDF-file>with the actual file path of the book you want to summarize.
BookGist also offers a web interface for a more interactive experience.
-
Configure Email Settings
-
Open
mail.pyand update the following variables with your email credentials:sender_address = 'your_email@example.com' sender_pass = 'your_email_password'
-
This allows the application to send the summary to your email address.
-
-
Run the Flask App
python3 app.py
-
Access the Web Interface
- Open your web browser and navigate to
http://localhost:5000.
- Open your web browser and navigate to
-
Upload and Summarize
- Use the interface to upload a PDF file and enter your email address to receive the summary.
Here's how you might run the CLI:
python3 summarizer_cli.py --path 'books/Interesting_Book.pdf' - Ensure you've configured your email settings in
mail.py. - The summary will be sent to the email address you provide when using the web interface.
We welcome contributions from the community! To contribute to BookGist, please follow these steps:
-
Fork the Repository
Click on the 'Fork' button at the top right corner of this page to create a copy of this repository on your GitHub account.
-
Clone Your Fork
git clone https://github.com/loganreedd/BookGist.git
-
Create a New Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -am 'Add a new feature' -
Push to Your Branch
git push origin feature/YourFeature
-
Submit a Pull Request
Go to the original repository on GitHub and create a pull request from your forked repository.
BookGist is licensed under the MIT License.
For any questions or suggestions, feel free to open an issue or contact the maintainer:
- Your Name
- Email: your_email@example.com
- GitHub: loganreedd
Crafted with ❤️ by Your Name
- Thanks to the developers of HuggingFace Transformers for their powerful NLP models.
- Inspired by the need to make reading more accessible and efficient.
BookGist — Unlock the essence of every book.