Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
| 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)}"
|