Code Monkey home page Code Monkey logo

text_summarizer's Introduction

Text Summarizer

This project implements a web application for summarizing long text articles using an AI-based text summarization model. It consists of a frontend interface for user input, a backend API for text summarization, and a MongoDB database to store the results.

Technologies Used:

  • Frontend: HTML, CSS, JavaScript
  • Backend: Python, Flask
  • Database: MongoDB
  • AI Model: Transformer's model (summarization pipeline)
  • Deployment: Waitress (for serving Flask app)

Assumptions:

  • The frontend is designed to be simple, focusing on usability for inputting long text and displaying the summarization result.
  • The backend encapsulates the AI logic for text summarization within a single endpoint /summarize.
  • MongoDB Atlas is chosen for creating the database cluster for storing summarized text and insights. The results are saved with a timestamp for reference.
  • Transformer's model is used for text summarization.
  • The application is hosted locally using Waitress for serving the Flask app. Deployment to a cloud provider like AWS is optional and not implemented in this version.
  • The maximum and minimum word length fosr the summarised output is specified as 130 and 30 respectively.
  • Pushing .env file to github is usually not a good practise, but I have included it to avoid such configurations to be directly defined in the code itself. This is just for the sake of this assignment and the .env file just contains the mongodb URI, so should be okay.

Prerequisites

Before running the project, ensure you have the following installed:

  • Python (3.7 or higher)

Installation and Usage:

  1. Clone the repository:
git clone https://github.com/yourusername/text-summarizer.git
cd text-summarizer
  1. Install backend dependencies:
pip install -r requirements.txt
  1. Start the backend server:
python main.py
  1. Access the application in your web browser:
http://localhost:3000
  1. Enter a long text article into the text input field and click "Summarize Text" button.
  2. Wait for the summarization process to complete. You'll see a spinner while the process is ongoing.
  3. Once the summary is generated, it will be displayed below the input field.

Customization

Changing AI Model: The backend uses an AI model for text summarization. You can modify the summarization logic in the app.py file or replace it with another AI service. Database Configuration: If you want to use a different database or configure MongoDB settings, update the app.py file accordingly. Frontend Styling: Customize the frontend appearance by modifying the HTML and CSS files in the frontend/public directory.

Deployment

To deploy the application to a cloud provider (e.g., AWS, Heroku), follow their respective deployment guides and ensure the necessary configurations are made for the backend, frontend, and database.

text_summarizer's People

Contributors

pihu1998 avatar sga-pranamika-pandey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.