Welcome to the Article Summarizer! This project leverages the power of Cohere embeddings and the LangChain framework to provide summarized insights from articles. The application is built using Streamlit, allowing for an interactive and user-friendly experience.
The Article Summarizer is designed to help users quickly obtain summaries and insights from multiple news articles. By simply inputting URLs of news articles, the application processes the content, splits it into manageable chunks, and applies state-of-the-art NLP techniques to retrieve the most relevant information based on user queries.
- 🔗 URL-based Content Retrieval: Input multiple article URLs for processing.
- ✂️ Text Splitting: Automatically splits long articles into smaller, manageable chunks for better analysis.
- 🔍 Contextual Compression: Uses Cohere's reranking model to compress and retrieve relevant content.
- 🗨️ Interactive Query Interface: Users can ask questions related to the articles and receive concise, relevant answers.
- 💾 Session Persistence: Maintains state across queries to provide a smooth user experience.
To install and run the project locally, follow these steps:
-
Clone the Repository
git clone https://github.com/ananty1/article-summarizer.git cd article-summarizer
-
Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables Create a
.env
file in the root directory and add your Cohere API key:COHERE_API_KEY=your-cohere-api-key
-
Run the Application
streamlit run main.py
Open the application in your browser.
- Input up to three URLs of news articles in the sidebar.
- Click "Process URLs" to load and analyze the content.
- Enter a query in the main interface to retrieve summarized insights based on the processed articles.
- Optionally, click "Quit" to clear the session state and end the session.
news-article-summarizer/
├── main.py # Main application script
├── requirements.txt # Python dependencies
├── .env # Environment variables (not included in the repo)
├── README.md # Project documentation
└── other necessary files...
For more details on Cohere integration with LangChain, refer to the Cohere documentation.
Contributions are welcome! If you have suggestions for improvements, feel free to fork the repository, create a new branch, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
For any inquiries or suggestions, please contact [email protected].