sohail-shaikh-s07 commited on
Commit
6d56a5b
Β·
verified Β·
1 Parent(s): 53ed53b

Update README.md

Browse files

updated readme file

Files changed (1) hide show
  1. README.md +68 -47
README.md CHANGED
@@ -4,79 +4,100 @@ emoji: πŸ“°
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: 5.9.1
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
 
12
- # News Article Summarizer
13
 
14
- This is a Gradio app that summarizes news articles using the BART-large-CNN model. Simply input a news article URL, and the app will provide a clean, concise, and accurate summary of the article.
15
 
16
- ## Features
17
 
18
- - URL-based article extraction
19
- - Automatic text summarization using state-of-the-art transformer model
20
- - Clean and user-friendly interface
21
- - Handles long articles by splitting them into chunks
 
22
 
23
- ## How to Use
24
 
25
- 1. Enter a news article URL in the input box
26
- 2. Click submit
27
- 3. Get your summarized article instantly
 
 
 
28
 
29
- ## Local Development
30
 
31
- To run this app locally:
32
-
33
- 1. Install the requirements:
34
- ```bash
35
- pip install -r requirements.txt
36
  ```
37
-
38
- 2. Run the app:
39
- ```bash
40
- python app.py
 
 
41
  ```
42
 
43
- ## Deployment
44
-
45
- This app is ready to be deployed on Hugging Face Spaces.
46
 
 
 
 
 
47
 
 
 
 
 
48
 
49
- # News Article Summarizer
 
 
 
 
50
 
51
- This is a Gradio app that summarizes news articles using the BART-large-CNN model. Simply input a news article URL, and the app will provide a clean, concise, and accurate summary of the article.
52
 
53
- ## Features
 
 
 
54
 
55
- - URL-based article extraction
56
- - Automatic text summarization using state-of-the-art transformer model
57
- - Clean and user-friendly interface
58
- - Handles long articles by splitting them into chunks
59
 
60
- ## How to Use
 
 
 
61
 
62
- 1. Enter a news article URL in the input box
63
- 2. Click submit
64
- 3. Get your summarized article instantly
65
 
66
- ## Local Development
 
 
 
67
 
68
- To run this app locally:
69
 
70
- 1. Install the requirements:
71
- ```bash
72
- pip install -r requirements.txt
 
73
  ```
74
 
75
- 2. Run the app:
76
- ```bash
77
- python app.py
78
- ```
 
 
79
 
80
- ## Deployment
81
 
82
- This app is ready to be deployed on Hugging Face Spaces.
 
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 4.0.0
8
  app_file: app.py
9
  pinned: false
10
+ license: mit
11
  ---
12
 
13
+ # πŸ“° News Article Summarizer
14
 
15
+ A powerful and efficient news article summarization tool powered by BART-Large-CNN model. This application automatically extracts and summarizes news articles from URLs, making it easier to quickly grasp the key points of any news article.
16
 
17
+ ## πŸš€ Features
18
 
19
+ - **Smart Article Extraction**: Automatically extracts article content from news URLs
20
+ - **Advanced Summarization**: Uses BART-Large-CNN model for high-quality summaries
21
+ - **Chunk Processing**: Handles long articles by processing them in chunks
22
+ - **Clean Output**: Removes unwanted elements like ads and navigation for better results
23
+ - **User-Friendly Interface**: Simple Gradio interface for easy interaction
24
 
25
+ ## πŸ› οΈ Technology Stack
26
 
27
+ - **Python**: Core programming language
28
+ - **BART-Large-CNN**: State-of-the-art summarization model
29
+ - **Gradio**: Web interface framework
30
+ - **BeautifulSoup4**: HTML parsing and content extraction
31
+ - **PyTorch**: Deep learning framework
32
+ - **Transformers**: Hugging Face transformers library
33
 
34
+ ## πŸ“‹ Requirements
35
 
 
 
 
 
 
36
  ```
37
+ gradio==5.9.1
38
+ transformers
39
+ torch
40
+ beautifulsoup4
41
+ requests
42
+ nltk
43
  ```
44
 
45
+ ## πŸš€ Getting Started
 
 
46
 
47
+ 1. **Install Dependencies**:
48
+ ```bash
49
+ pip install -r requirements.txt
50
+ ```
51
 
52
+ 2. **Run the Application**:
53
+ ```bash
54
+ python app.py
55
+ ```
56
 
57
+ 3. **Use the App**:
58
+ - Open the provided URL in your browser
59
+ - Paste a news article URL
60
+ - Wait for the summary (processing time depends on article length)
61
+ - Get your concise summary!
62
 
63
+ ## πŸ’‘ How It Works
64
 
65
+ 1. **Article Extraction**:
66
+ - Fetches article content from the provided URL
67
+ - Removes unwanted elements (ads, navigation, etc.)
68
+ - Extracts main article text
69
 
70
+ 2. **Text Processing**:
71
+ - Splits long articles into manageable chunks (1024 tokens each)
72
+ - Cleans and prepares text for summarization
 
73
 
74
+ 3. **Summarization**:
75
+ - Uses BART-Large-CNN model for each chunk
76
+ - Combines summaries for a coherent final output
77
+ - Provides clean, readable summaries
78
 
79
+ ## ⚠️ Notes
 
 
80
 
81
+ - Processing time varies based on article length
82
+ - Look for "Running..." indicator while processing
83
+ - Wait patiently for best results
84
+ - Model can be changed to T5 or GPT-2 for different results
85
 
86
+ ## πŸ”„ Example Usage
87
 
88
+ ```python
89
+ # Example URLs:
90
+ https://www.bbc.com/sport/football/articles/cvgxmzy86e4o
91
+ https://globalsouthworld.com/article/biden-approves-571-million-in-defense-support-for-taiwan
92
  ```
93
 
94
+ ## 🀝 Contributing
95
+
96
+ Feel free to:
97
+ - Open issues
98
+ - Suggest improvements
99
+ - Submit pull requests
100
 
101
+ ## πŸ“ License
102
 
103
+ This project is open source and available under the MIT License.