Skip to content

Latest commit

 

History

History
144 lines (90 loc) · 6.87 KB

File metadata and controls

144 lines (90 loc) · 6.87 KB

📜 Text Summarization Web App

Welcome to the Text Summarization Web App! This web application allows users to easily summarize text by either providing a URL or directly pasting text. It leverages the power of the Hugging Face Transformers for generating concise and informative summaries.

torrynnFeatures

  • 🌐 Summarize from URL: Fetches and summarizes text content from a provided URL.
  • 📝 Summarize from Text: Allows users to input text directly and get a summary.
  • ⚙️ Dynamic Length: Users can specify the desired length of the summary using a slider.
  • 📱 Responsive Design: Ensures the application adapts well to various screen sizes and devices.

torrynn 🛠️ Technologies Used

  • Flask Flask: For creating the web application.
  • BeautifulSoup BeautifulSoup: For scraping text data from HTML.
  • Hugging Face Transformers Hugging Face Transformers: For text summarization.
  • dotenv dotenv: For environment variable management.
  • HTML5 HTML: For structuring the front-end interface.
  • CSS CSS: For styling the front-end interface.

torrynn 🚀 Getting Started

Prerequisites

Ensure you have the following installed:

  • Python 3.x
  • pip

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/text-summarization-webapp.git
    cd text-summarization-webapp
  2. Install the required packages:

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

    Create a .env file in the root directory and add your Hugging Face API key:

    API_KEY=your_huggingface_api_key

Running the App

Start the Flask application:

```sh
python app.py
```

Navigate to http://127.0.0.1:5000 in your browser to use the app.

torrynn 🧭 Usage

  1. Home Page: Enter a URL or paste the text you want to summarize.
  2. Specify Length: Input the maximum length of the summary.
  3. Get Summary: Click the 'Summarize' button to get the summarized text.

torrynn 📁 Code Overview

app.py

This is the main Flask application file.

  • Routes:

    • /: Renders the main page.
    • /Summarize: Handles the summarization logic.
  • Functions:

    • Index(): Renders the index.html template.
    • Summarize(): Processes the URL or text input and fetches the summary from the Hugging Face API.

templates/index.html

The main HTML template for the web interface.

static/css/styles.css

Contains custom styles for the web app.

torrynn 🖼️ Example

Here is an example of how the summarized output looks:

Preview 1 📱
iPhone 13 PRO
Preview 2 💻
Macbook Air
Preview 3 📟
iPad Air 4

torrynn 📑 Presentation

For a deeper understanding of text summarization, you can refer to my Text Summarization PowerPoint Presentation.

torrynn 🤝 Contributing

Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

torrynn 📜 License

This project is licensed under the MIT License.

torrynn 🙏 Acknowledgements

  • Hugging Face for their powerful Transformers library.
  • Flask for providing a lightweight web framework.

torrynn 🌐 Social

Follow me on social media for updates and more: pratham-chauhan-265a8b15a

Feel free to explore, use, and contribute to this project! If you have any questions or suggestions, please open an issue or reach out.

Happy summarizing! 😊

torrynn