Spaces:
Runtime error
Runtime error
Commit
•
0721d35
1
Parent(s):
199825b
update
Browse files
app.py
CHANGED
@@ -50,6 +50,17 @@ def inference(newssource): #, date):
|
|
50 |
sentiment = sentiment_hindu
|
51 |
elif newssource == "Google News":
|
52 |
sentiment = sentiment_google
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
dictnews = { 'description' : [entry['description'] for entry in all_articles['articles']],
|
55 |
'content' : [entry['content'] for entry in all_articles['articles']],
|
|
|
50 |
sentiment = sentiment_hindu
|
51 |
elif newssource == "Google News":
|
52 |
sentiment = sentiment_google
|
53 |
+
|
54 |
+
description = [entry['description'] for entry in all_articles['articles']]
|
55 |
+
content = [entry['content'] for entry in all_articles['articles']]
|
56 |
+
url = [entry['url'] for entry in all_articles['articles']]
|
57 |
+
urlToImage = [entry['urlToImage'] for entry in all_articles['articles']]
|
58 |
+
|
59 |
+
print(f"description length is {len(description)}")
|
60 |
+
print(f"content length is {len(content)}")
|
61 |
+
print(f"url length is {len(url)}")
|
62 |
+
print(f"urlToImage length is {len(urlToImage)}")
|
63 |
+
print(f"sentiment length is {len(sentiment)}")
|
64 |
|
65 |
dictnews = { 'description' : [entry['description'] for entry in all_articles['articles']],
|
66 |
'content' : [entry['content'] for entry in all_articles['articles']],
|