gus07ven commited on
Commit
509d5b9
·
verified ·
1 Parent(s): f8864ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ def get_latest_astros_score(todays_date:str)-> str: #it's import to specify the
17
  todays_date: the current date or today's date
18
  """
19
  try:
20
- latest_score = DuckDuckGoSearchTool(f"What's the Houston Astros score for today's game. Today's date is {todays_date}")
 
21
  return f"The score for {todays_date} game is: {latest_score}"
22
  except Exception as e:
23
  return f"Error fetching Astros' scores for '{todays_date}': {str(e)}"
 
17
  todays_date: the current date or today's date
18
  """
19
  try:
20
+ search = DuckDuckGoSearchTool()
21
+ latest_score = search.run(f"What's the Houston Astros score for today's game. Today's date is {todays_date}")
22
  return f"The score for {todays_date} game is: {latest_score}"
23
  except Exception as e:
24
  return f"Error fetching Astros' scores for '{todays_date}': {str(e)}"