8000 GitHub - apsinha/url-summarizer · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Text Summarizer

A Flask web application that extracts and summarizes text content from any URL using state-of-the-art natural language processing.

Features

  • Clean, modern web interface
  • Extracts main content from any URL
  • Uses BART-large-CNN model for high-quality summarization
  • Shows original text alongside the summary
  • Provides content statistics (length and compression ratio)
  • Responsive design with loading states and error handling

Requirements

  • Python 3.8+
  • Flask 3.0.0
  • Transformers 4.36.2
  • BeautifulSoup4 4.12.2
  • PyTorch 2.1.2

Installation

  1. Clone the repository:

    git clone https://github.com/apsinha/url-summarizer.git
    cd url-summarizer
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Start the Flask server:

    python app.py
  2. Open your web browser and navigate to:

    http://localhost:5000
    
  3. Enter a URL in the input field and click "Summarize"

How It Works

  1. When a URL is submitted, the application:

    • Fetches the webpage content
    • Extracts the main text using BeautifulSoup
    • Processes the text to remove unnecessary elements
    • Generates a concise summary using the BART model
    • Displays both the original text and summary
  2. The summary generation:

    • Handles long texts by splitting into chunks
    • Uses beam search for better quality
    • Adapts summary length based on input size
    • Provides compression statistics

Development

  • The application is built with Flask for the backend
  • Uses modern HTML/CSS/JavaScript for the frontend
  • Implements responsive design principles
  • Includes proper error handling and loading states

License

MIT License - feel free to use this project as you wish.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0