The News Summarizer is a web application and browser extension that allows users to summarize news articles from any URL. This tool is designed to help users quickly get the main points of an article without having to read the entire text. It features user authentication, a history of summarized articles, and the ability to customize the summary length.
- Article Summarization: Summarizes news articles using a machine learning model.
- User Authentication: Users can sign up and log in to their accounts.
- Summarization History: Keeps a history of all the articles a user has summarized.
- Customizable Summary Length: Allows users to set the maximum number of words for the summary.
- Browser Extension: A convenient browser extension to summarize articles directly from the news page.
- Dark Mode: A dark mode option for the user interface.
- Export Options: Users can copy, download, or share the generated summary.
The project is divided into several components:
- Backend: Contains the server-side code, including the API for summarization, user authentication, and database management. There are two backend implementations: one in Python with Flask and SQLite (
Backend/all_in_one.py), and another in Node.js with Express and MongoDB (Backend/news-auth-backend/server.js). - ML Model: Includes the machine learning model for text summarization. The model is built using the Hugging Face Transformers library (
ML Model/mini_project.py). - UI: The user interface for the web application and the browser extension popup, built with HTML, CSS, and JavaScript. A React-based UI is also included (
UI/App.jsx). - Extension: The browser extension code, including the manifest file and popup scripts.
- Web Scrapping: A Python script that scrapes the content of the news articles from the provided URLs (
Web Scrapping/NewsScraping.py).
- Backend:
- Python, Flask, SQLite
- Node.js, Express, MongoDB
- Frontend:
- HTML, CSS, JavaScript
- React
- Machine Learning:
- Python
- Hugging Face Transformers (specifically, the DistilBART model)
- Web Scraping:
- Python
- BeautifulSoup
- Requests
-
Python Backend:
- Navigate to the
Backenddirectory. - Install the required Python packages:
pip install -r requirements.txt(Arequirements.txtwould need to be created from the imported modules inall_in_one.py). - Run the Flask server:
python all_in_one.py
- Navigate to the
-
Node.js Backend:
- Navigate to the
Backend/news-auth-backenddirectory. - Install the dependencies:
npm install - Create a
.envfile withMONGO_URIandJWT_SECRETvariables. - Start the server:
node server.js
- Navigate to the
- The model is trained using the
ML Model/mini_project.pyscript. - The trained model is saved in the
./summarizer_modeldirectory and used by the Python backend.
- Open your browser's extension management page.
- Enable "Developer mode".
- Click on "Load unpacked" and select the
Extensiondirectory.
- Log in or sign up through the extension popup.
- Navigate to a news article you want to summarize.
- Click on the extension icon.
- Adjust the desired summary length using the slider.
- Click the "Summarize" button.
- The summary will be displayed in the popup. You can then copy, download, or share it.
