Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,6 +33,17 @@ def get_square_root_tool(input_number:int)-> int: #it's import to specify the re
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching Square root of '{input_number}': {str(e)}"
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
@tool
|
| 37 |
def classify_educational_article(text: str) -> str:
|
| 38 |
"""
|
|
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching Square root of '{input_number}': {str(e)}"
|
| 35 |
|
| 36 |
+
@tool
|
| 37 |
+
def get_stock_public_sentiment(stock:str)-> int: #it's import to specify the return type
|
| 38 |
+
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 39 |
+
"""A tool that does nothing yet
|
| 40 |
+
Args:
|
| 41 |
+
stock: a string which represents the ticker name or name of a stock whose public sentiment is to be calculated
|
| 42 |
+
"""
|
| 43 |
+
search = DuckDuckGoSearchResults(backend="news",output_format="list")
|
| 44 |
+
search_result = search.invoke("Tesla")
|
| 45 |
+
print(search_result)
|
| 46 |
+
|
| 47 |
@tool
|
| 48 |
def classify_educational_article(text: str) -> str:
|
| 49 |
"""
|