Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,8 @@ import nltk
|
|
2 |
nltk.download('punkt_tab')
|
3 |
nltk.download('averaged_perceptron_tagger_eng')
|
4 |
import streamlit as st
|
|
|
|
|
5 |
import time
|
6 |
from utils import (
|
7 |
get_bing_news_articles,
|
@@ -11,6 +13,19 @@ from utils import (
|
|
11 |
convert_text_to_hindi_tts,
|
12 |
)
|
13 |
from collections import Counter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
st.title("News Summarization & Sentiment Analysis with Hindi TTS")
|
16 |
st.write("Enter a company name to fetch news articles, analyze sentiment, and generate a Hindi summary.")
|
|
|
2 |
nltk.download('punkt_tab')
|
3 |
nltk.download('averaged_perceptron_tagger_eng')
|
4 |
import streamlit as st
|
5 |
+
from streamlit_lottie import st_lottie
|
6 |
+
import requests
|
7 |
import time
|
8 |
from utils import (
|
9 |
get_bing_news_articles,
|
|
|
13 |
convert_text_to_hindi_tts,
|
14 |
)
|
15 |
from collections import Counter
|
16 |
+
# Load Lottie Animation
|
17 |
+
def load_lottie_url(url):
|
18 |
+
r = requests.get(url)
|
19 |
+
if r.status_code != 200:
|
20 |
+
return None
|
21 |
+
return r.json()
|
22 |
+
|
23 |
+
lottie_animation = load_lottie_url("https://assets10.lottiefiles.com/packages/lf20_tfb3estd.json")
|
24 |
+
|
25 |
+
# UI Layout
|
26 |
+
st_lottie(lottie_animation, height=300)
|
27 |
+
st.markdown("<h1 style='text-align: center; color: #4CAF50;'>Sentiment Analysis Dashboard</h1>", unsafe_allow_html=True)
|
28 |
+
|
29 |
|
30 |
st.title("News Summarization & Sentiment Analysis with Hindi TTS")
|
31 |
st.write("Enter a company name to fetch news articles, analyze sentiment, and generate a Hindi summary.")
|