Page Summarizer is a Python application that extracts text from a given URL and uses OpenAI's GPT-4 model, interfaced through the LangChain library, to generate a comprehensive summary and key points of the extracted text. The application leverages the power of GPT-4's natural language understanding to provide concise and relevant summaries, making it easier to digest large amounts of information quickly.
To run this project, you will need Python installed on your machine along with the necessary packages. Follow these steps:
- Clone the repository to your local machine.
- Install the required dependencies by running
pip install -r requirements.txt
. - Set up your environment variables by creating a
.env
file with your OpenAI API key asOPENAI_API_KEY
. - Run the script using the command
python app.py <URL>
, where<URL>
is the URL of the webpage you want to summarize.
To build and run the project using Docker, follow these steps:
- Ensure you have Docker installed on your machine.
- Navigate to the directory containing the Dockerfile.
- Build the Docker image using the command:
docker build -t page-summarizer .
- Once the image is built, run the container using the command:
Replace
docker run -e OPENAI_API_KEY='your_openai_api_key' --rm page-summarizer <URL>
your_openai_api_key
with your actual OpenAI API key and<URL>
with the URL of the webpage you want to summarize.