Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,8 +17,7 @@ def get_stock_price(company:str)-> str: #it's import to specify the return type
|
|
| 17 |
"""
|
| 18 |
try:
|
| 19 |
web_search_tool = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)
|
| 20 |
-
|
| 21 |
-
return f"The current price for '{company}' is '{price}'"
|
| 22 |
except Exception as e:
|
| 23 |
return f"Error fetching the stock price for '{company}': {str(e)}"
|
| 24 |
|
|
|
|
| 17 |
"""
|
| 18 |
try:
|
| 19 |
web_search_tool = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)
|
| 20 |
+
return web_search_tool(f"'{company}' stock price")
|
|
|
|
| 21 |
except Exception as e:
|
| 22 |
return f"Error fetching the stock price for '{company}': {str(e)}"
|
| 23 |
|