Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
@@ -1,68 +1,77 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
-
|
20 |
-
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
```
|
41 |
-
|
42 |
-
|
43 |
-
```
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: NewsAnalyzer
|
3 |
+
emoji: 📰
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: gray
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
---
|
9 |
+
|
10 |
+
# NewsAnalyzer
|
11 |
+
|
12 |
+
[Live Demo](https://huggingface.co/spaces/YOUR_USERNAME/NewsAnalyzer)
|
13 |
+
|
14 |
+
NewsAnalyzer is a web application that analyzes news articles using natural language processing (NLP) techniques. It helps users quickly understand the sentiment, key topics, and overall trends in the latest news based on any search query.
|
15 |
+
|
16 |
+
## Features
|
17 |
+
|
18 |
+
- Search for recent news articles using NewsAPI
|
19 |
+
- Perform sentiment analysis to determine whether each article is positive or negative
|
20 |
+
- Automatically categorize articles into topics such as business, technology, politics, and more
|
21 |
+
- Generate concise summaries for each article
|
22 |
+
- Extract the most frequently mentioned words and display them in a word cloud
|
23 |
+
- Visualize sentiment distribution and trending words in clear charts
|
24 |
+
- Cache recent searches for improved performance
|
25 |
+
|
26 |
+
## Technologies
|
27 |
+
|
28 |
+
- **Flask** for backend logic and routing
|
29 |
+
- **Hugging Face Transformers** for NLP tasks:
|
30 |
+
- Sentiment analysis: [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english)
|
31 |
+
- Topic classification: [cardiffnlp/tweet-topic-21-multi](https://huggingface.co/cardiffnlp/tweet-topic-21-multi)
|
32 |
+
- Summarization: [facebook/bart-large-cnn](https://huggingface.co/facebook/bart-large-cnn)
|
33 |
+
- **NLTK** for tokenization and text preprocessing
|
34 |
+
- **Matplotlib** and **WordCloud** for visualizations
|
35 |
+
- **NewsAPI** for retrieving real-time news articles
|
36 |
+
|
37 |
+
## Installation
|
38 |
+
|
39 |
+
1. Clone the repository:
|
40 |
+
```bash
|
41 |
+
git clone https://github.com/ihaveaplan66/news-analyzer.git
|
42 |
+
cd NewsAnalyzer
|
43 |
+
```
|
44 |
+
|
45 |
+
2. Create a virtual environment and activate it:
|
46 |
+
```bash
|
47 |
+
python -m venv venv
|
48 |
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
49 |
+
```
|
50 |
+
|
51 |
+
3. Install dependencies:
|
52 |
+
```bash
|
53 |
+
pip install -r requirements.txt
|
54 |
+
```
|
55 |
+
|
56 |
+
4. Set your NewsAPI key in `app.py`:
|
57 |
+
```python
|
58 |
+
api_key = "your_newsapi_key_here"
|
59 |
+
```
|
60 |
+
|
61 |
+
5. Run the application:
|
62 |
+
```bash
|
63 |
+
python app.py
|
64 |
+
```
|
65 |
+
|
66 |
+
6. Open the application in your browser:
|
67 |
+
```
|
68 |
+
http://localhost:5000
|
69 |
+
```
|
70 |
+
|
71 |
+
## License
|
72 |
+
|
73 |
+
This project is part of my personal portfolio and is provided under the MIT License.
|
74 |
+
|
75 |
+
## Author
|
76 |
+
|
77 |
+
Created by Volodymyr Shereperov
|