Prince-29 commited on
Commit
f952260
·
1 Parent(s): f3333e8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -67
README.md CHANGED
@@ -1,67 +1,79 @@
1
- # News Summarization & Sentiment Analysis
2
-
3
- ## Overview
4
- This project is a web-based application that extracts news articles related to a given company, performs sentiment analysis, generates a comparative analysis, and converts the summarized content into Hindi speech.
5
-
6
- ## Features
7
- - **News Extraction:** Fetches news articles using NewsAPI and scrapes additional content when available.
8
- - **Sentiment Analysis:** Categorizes each article as Positive, Negative, or Neutral.
9
- - **Comparative Analysis:** Provides an overview of sentiment distribution across articles.
10
- - **Text-to-Speech:** Converts summarized news titles into Hindi speech.
11
- - **Web Interface:** Allows users to input a company name via a Streamlit UI.
12
- - **API Integration:** Backend developed using FastAPI to communicate with the frontend.
13
-
14
- ## Installation
15
- ### Prerequisites
16
- Ensure you have Python installed (>= 3.8). Install the required dependencies:
17
-
18
- ```bash
19
- pip install requests nltk beautifulsoup4 gtts deep-translator streamlit fastapi pydantic uvicorn
20
- ```
21
-
22
- ### Download NLTK Data
23
- To enable sentiment analysis, run:
24
- ```python
25
- import nltk
26
- nltk.download('vader_lexicon')
27
- ```
28
-
29
- ## Usage
30
- ### Running the FastAPI Backend
31
- Start the FastAPI server using:
32
- ```bash
33
- uvicorn news:app --reload
34
- ```
35
-
36
- ### Running the Streamlit UI
37
- Launch the web application:
38
- ```bash
39
- streamlit run news.py
40
- ```
41
-
42
- ## API Endpoints
43
- - `POST /get_news/`
44
- - **Request Body:**
45
- ```json
46
- { "company": "Tesla" }
47
- ```
48
- - **Response:**
49
- ```json
50
- {
51
- "articles": [...],
52
- "sentiment_summary": {"Positive": 3, "Negative": 4, "Neutral": 3}
53
- }
54
- ```
55
-
56
- ## Deployment
57
- - **Deploy FastAPI Backend:** Use services like **AWS, Heroku, or Render**.
58
- - **Deploy Streamlit UI:** Host on **Streamlit Cloud or Hugging Face Spaces**.
59
-
60
- ## Acknowledgments
61
- - [NewsAPI](https://newsapi.org/) for fetching news.
62
- - [NLTK](https://www.nltk.org/) for sentiment analysis.
63
- - [Google Translate API](https://pypi.org/project/deep-translator/) for Hindi translation.
64
- - [Streamlit](https://streamlit.io/) for the UI.
65
- - [FastAPI](https://fastapi.tiangolo.com/) for backend API.
66
-
67
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: News Sentiment Analyzer
3
+ emoji: 🐨
4
+ colorFrom: gray
5
+ colorTo: blue
6
+ sdk: streamlit
7
+ sdk_version: 1.43.2
8
+ app_file: app.py
9
+ pinned: false
10
+ short_description: 'simple app to analyze news sentiment '
11
+ ---
12
+
13
+ # News Summarization & Sentiment Analysis
14
+
15
+ ## Overview
16
+ This project is a web-based application that extracts news articles related to a given company, performs sentiment analysis, generates a comparative analysis, and converts the summarized content into Hindi speech.
17
+
18
+ ## Features
19
+ - **News Extraction:** Fetches news articles using NewsAPI and scrapes additional content when available.
20
+ - **Sentiment Analysis:** Categorizes each article as Positive, Negative, or Neutral.
21
+ - **Comparative Analysis:** Provides an overview of sentiment distribution across articles.
22
+ - **Text-to-Speech:** Converts summarized news titles into Hindi speech.
23
+ - **Web Interface:** Allows users to input a company name via a Streamlit UI.
24
+ - **API Integration:** Backend developed using FastAPI to communicate with the frontend.
25
+
26
+ ## Installation
27
+ ### Prerequisites
28
+ Ensure you have Python installed (>= 3.8). Install the required dependencies:
29
+
30
+ ```bash
31
+ pip install requests nltk beautifulsoup4 gtts deep-translator streamlit fastapi pydantic uvicorn
32
+ ```
33
+
34
+ ### Download NLTK Data
35
+ To enable sentiment analysis, run:
36
+ ```python
37
+ import nltk
38
+ nltk.download('vader_lexicon')
39
+ ```
40
+
41
+ ## Usage
42
+ ### Running the FastAPI Backend
43
+ Start the FastAPI server using:
44
+ ```bash
45
+ uvicorn news:app --reload
46
+ ```
47
+
48
+ ### Running the Streamlit UI
49
+ Launch the web application:
50
+ ```bash
51
+ streamlit run news.py
52
+ ```
53
+
54
+ ## API Endpoints
55
+ - `POST /get_news/`
56
+ - **Request Body:**
57
+ ```json
58
+ { "company": "Tesla" }
59
+ ```
60
+ - **Response:**
61
+ ```json
62
+ {
63
+ "articles": [...],
64
+ "sentiment_summary": {"Positive": 3, "Negative": 4, "Neutral": 3}
65
+ }
66
+ ```
67
+
68
+ ## Deployment
69
+ - **Deploy FastAPI Backend:** Use services like **AWS, Heroku, or Render**.
70
+ - **Deploy Streamlit UI:** Host on **Streamlit Cloud or Hugging Face Spaces**.
71
+
72
+ ## Acknowledgments
73
+ - [NewsAPI](https://newsapi.org/) for fetching news.
74
+ - [NLTK](https://www.nltk.org/) for sentiment analysis.
75
+ - [Google Translate API](https://pypi.org/project/deep-translator/) for Hindi translation.
76
+ - [Streamlit](https://streamlit.io/) for the UI.
77
+ - [FastAPI](https://fastapi.tiangolo.com/) for backend API.
78
+
79
+