Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ search_tool = DuckDuckGoSearchTool()
|
|
18 |
@tool
|
19 |
def get_latest_news() -> Dict[str, List[str]]:
|
20 |
"""
|
21 |
-
Tool returns news headlines from
|
22 |
|
23 |
Returns:
|
24 |
Dict[str, List[str]]: A dictionary where the keys are the news site URLs and the values are lists of headlines.
|
@@ -31,9 +31,10 @@ def get_latest_news() -> Dict[str, List[str]]:
|
|
31 |
}
|
32 |
If a site is not found in `site_config`, it defaults to {'tag': 'h2', 'class': 'headline'}.
|
33 |
"""
|
34 |
-
news_sites = ["https://www.cnn.com/"]
|
35 |
site_config = {
|
36 |
-
"https://www.cnn.com/": {'tag': 'h2', 'class': 'headline'}
|
|
|
37 |
}
|
38 |
|
39 |
headlines = {}
|
|
|
18 |
@tool
|
19 |
def get_latest_news() -> Dict[str, List[str]]:
|
20 |
"""
|
21 |
+
Tool returns news headlines from news sites.
|
22 |
|
23 |
Returns:
|
24 |
Dict[str, List[str]]: A dictionary where the keys are the news site URLs and the values are lists of headlines.
|
|
|
31 |
}
|
32 |
If a site is not found in `site_config`, it defaults to {'tag': 'h2', 'class': 'headline'}.
|
33 |
"""
|
34 |
+
news_sites = ["https://www.cnn.com/", "https://www.politico.com/"]
|
35 |
site_config = {
|
36 |
+
"https://www.cnn.com/": {'tag': 'h2', 'class': 'headline'},
|
37 |
+
"https://www.politico.com/": {'tag': 'h2', 'class': 'headline'}
|
38 |
}
|
39 |
|
40 |
headlines = {}
|