I built this just to get hands-on experience with Hugging Face models, Streamlit, and Transformers. It's a simple Streamlit app to upload PDF files and generate concise summaries using Hugging Face Transformers.
- Upload PDF files via a simple web interface
- Automatic extraction of text from PDFs
- Summarization using the BART model (
facebook/bart-large-cnn
) - Handles long documents by chunking text
- Progress bar for summarization process
- Python 3.7+
- Streamlit
- transformers
- torch
- Clone the repository:
git clone <repository-url> cd DocSummarizer
- Install dependencies:
pip install -r requirements.txt
- Run the Streamlit app:
streamlit run main.py
- Open the provided local URL in your browser.
- Upload a PDF file and view the generated summary.
- The summarization model is loaded locally. Ensure you have downloaded the
facebook/bart-large-cnn
model or have internet access for the first run. - GPU support is recommended for faster summarization.