PDF Summarizer App.
This PDF Summarizing App uses Streamlit, Langchain, and OpenAI GPT-3.5 to generate concise summaries of PDF documents. The app allows users to upload their PDF files and receive a summary within seconds.
Features
PDF Upload: Upload a PDF file and get it processed in real-time.
Text Summarization: Generates a 3-5 sentence summary of the content using OpenAI’s GPT-3.5 model.
Efficient Processing: Text is split into chunks for optimized embedding and search.
OpenAI GPT-3.5 Integration: Uses OpenAI GPT-3.5-turbo-16k for generating summaries.
Simple Interface: Built with Streamlit for an easy-to-use and visually appealing UI.
Demo Here’s how the app works:
Upload a PDF document.
Press the “Generate Summary” button.
The app will return a concise summary of the document.
Tech Stack
Frontend: Streamlit
Backend: Python
Libraries: Langchain (for chunking, embeddings, and document search)
HuggingFace Sentence Embeddings (sentence-transformers/all-MiniLM-L6-v2)
FAISS (for efficient similarity search)
OpenAI GPT-3.5-turbo-16k (for summarization)
PyPDF (for reading PDFs)
Model API: OpenAI GPT-3.5
Setup and Installation Clone this repository:
bash
git clone https://github.com/yourusername/pdf-summarizer-app.git
cd pdf-summarizer-app
Install the required dependencies:
bash
pip install -r requirements.txt
Set your OpenAI API key:
In the app.py file, set your OpenAI API key:
python
os.environ[“OPENAI_API_KEY”] = “your-openai-api-key”
Run the app:
bash
streamlit run app.py
Access the app in your browser at http://localhost:8501.
Usage
Upload a PDF file using the provided uploader.
Click the Generate Summary button.
The summary will be displayed below the uploader.
Limitations
OpenAI API Quota: The app relies on OpenAI’s API, which has a limited usage quota. If the error You exceeded your current quota appears, it indicates that the quota has been reached. You can review the code for further evaluation.
Contributing
Feel free to fork this repository, create issues, or make pull requests. All contributions are welcome!
License
This project is licensed under the MIT License - see the LICENSE file for details