Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ananty1/article-summarizer-langchain-
A powerful tool for summarizing news articles using LangChain and Cohere. Load articles from URLs, process them, and retrieve concise summaries. The application leverages advanced NLP techniques for effective information extraction and presentation.
https://github.com/ananty1/article-summarizer-langchain-
cohere cohere-ai jupyter-notebooks langchain python3 streamlit
Last synced: about 1 month ago
JSON representation
A powerful tool for summarizing news articles using LangChain and Cohere. Load articles from URLs, process them, and retrieve concise summaries. The application leverages advanced NLP techniques for effective information extraction and presentation.
- Host: GitHub
- URL: https://github.com/ananty1/article-summarizer-langchain-
- Owner: ananty1
- Created: 2024-08-24T23:42:40.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T08:17:46.000Z (3 months ago)
- Last Synced: 2024-10-10T09:22:15.104Z (about 1 month ago)
- Topics: cohere, cohere-ai, jupyter-notebooks, langchain, python3, streamlit
- Language: Jupyter Notebook
- Homepage: https://article-analyzer-ananty1.streamlit.app/
- Size: 163 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Article Summarizer
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.
## Introduction
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.
## Features
- **🔗 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.## Installation
To install and run the project locally, follow these steps:
1. **Clone the Repository**
```bash
git clone https://github.com/ananty1/article-summarizer.git
cd article-summarizer
```2. **Create and Activate a Virtual Environment**
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```3. **Install the Dependencies**
```bash
pip install -r requirements.txt
```4. **Set Up Environment Variables**
Create a `.env` file in the root directory and add your Cohere API key:
```makefile
COHERE_API_KEY=your-cohere-api-key
```5. **Run the Application**
```bash
streamlit run main.py
```## Usage
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.## Project Structure
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...## Documentation
For more details on Cohere integration with LangChain, refer to the [Cohere documentation](https://python.langchain.com/v0.2/docs/integrations/retrievers/cohere/).
## Contributing
Contributions are welcome! If you have suggestions for improvements, feel free to fork the repository, create a new branch, and submit a pull request.## License
This project is licensed under the MIT License. See the LICENSE file for more information.## Contact
For any inquiries or suggestions, please contact [email protected].![Alt text](https://raw.githubusercontent.com/ananty1/Article-Summarizer-LangChain-/main/Article-Summarizer-LLM.png)