dygoo commited on
Commit
0bbb75c
·
verified ·
1 Parent(s): 9a83014

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -17,7 +17,7 @@ from Gradio_UI import GradioUI
17
 
18
  search_tool = DuckDuckGoSearchTool()
19
 
20
- system_message="""You have access to a variety of tools that you can use to fetch news sources. Please provide a five line concised paragraph about what's happening in the world."""
21
 
22
 
23
  @tool
@@ -25,7 +25,8 @@ def get_latest_news() -> Dict[str, List[Dict]]:
25
  """
26
  Tool returns latest news from major news outlets using reliable RSS feeds.
27
  Returns:
28
- Dict[str, List[Dict]]: A dictionary where keys are news sources and values are lists of news items.
 
29
  """
30
  rss_feeds = {
31
  "NPR": {
@@ -39,12 +40,6 @@ def get_latest_news() -> Dict[str, List[Dict]]:
39
  "World": "http://feeds.bbci.co.uk/news/world/rss.xml",
40
  "Politics": "http://feeds.bbci.co.uk/news/politics/rss.xml",
41
  "Business": "http://feeds.bbci.co.uk/news/business/rss.xml"
42
- },
43
- "ABC News": {
44
- "Top Stories": "https://abcnews.go.com/abcnews/topstories",
45
- "World News": "https://abcnews.go.com/abcnews/worldnewsheadlines",
46
- "Politics": "https://abcnews.go.com/abcnews/politicsheadlines",
47
- "Business": "https://abcnews.go.com/abcnews/moneyheadlines"
48
  }
49
  }
50
 
 
17
 
18
  search_tool = DuckDuckGoSearchTool()
19
 
20
+ system_message="""You have access to a variety of tools that you can use to fetch news sources. Your goal is to provide a summary of all news in a maximum of five sentences."""
21
 
22
 
23
  @tool
 
25
  """
26
  Tool returns latest news from major news outlets using reliable RSS feeds.
27
  Returns:
28
+ A summary of all titles compiled in a single concise text of maximum five sentences.
29
+ # Dict[str, List[Dict]]: A dictionary where keys are news sources and values are lists of news items.
30
  """
31
  rss_feeds = {
32
  "NPR": {
 
40
  "World": "http://feeds.bbci.co.uk/news/world/rss.xml",
41
  "Politics": "http://feeds.bbci.co.uk/news/politics/rss.xml",
42
  "Business": "http://feeds.bbci.co.uk/news/business/rss.xml"
 
 
 
 
 
 
43
  }
44
  }
45