Skip to content

About

Text summarizer

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 LangChain Text Summarizer

A powerful text summarization tool built with LangChain and Streamlit that transforms long texts into concise summaries using AI.

✨ Features

  • Multiple Summary Types: Choose between standard summaries and bullet-point format
  • Flexible Input: Type/paste text directly or upload text files (.txt, .md)
  • Smart Text Processing: Automatically handles long texts with chunking and map-reduce summarization
  • Real-time Statistics: View character count, word count, and compression ratios
  • Download Summaries: Save your summaries as text files
  • User-friendly Interface: Clean, intuitive Streamlit web interface

🌐 Live Demo

Try it now: https://thetextssummarizer.streamlit.app/

Prerequisites

  • Python 3.7+
  • OpenRouter API account (or compatible OpenAI API)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd langchain-text-summarizer
  2. Install dependencies

    pip install -r requirements.txt
  3. Set up environment variables

    Create a .env file in the project root:

    API_KEY=your_api_key_here
    MODEL_NAME=mistralai/mistral-small-3.1-24b-instruct:free
    BASE_URL=https://openrouter.ai/api/v1
  4. Run the application

    streamlit run app.py

🔧 Configuration

Environment Variables

Variable Description Example
API_KEY Your AI model API key sk-...
MODEL_NAME AI model identifier mistralai/mistral-small-3.1-24b-instruct:free
BASE_URL API endpoint URL https://openrouter.ai/api/v1

Supported Models

This project is configured to work with OpenRouter's free models, but can be adapted for:

  • OpenAI GPT models
  • Anthropic Claude
  • Other LangChain-compatible models

💡 Usage

  1. Choose Summary Type: Select between "Standard Summary" or "Bullet Points"
  2. Input Text: Either paste text directly or upload a file
  3. Generate Summary: Click the "Generate Summary" button
  4. Review Results: View your summary with compression statistics
  5. Download: Save your summary as a text file

📄 License

This project is open source and available under the MIT License.

About

Text summarizer

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages