Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,19 +36,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 36 |
|
| 37 |
@tool
|
| 38 |
def get_current_price(ticker_symbol: str) -> float:
|
| 39 |
-
"""
|
| 40 |
-
A tool that fetches the latest stock price for a given stock ticker.
|
| 41 |
-
|
| 42 |
-
Args:
|
| 43 |
-
ticker_symbol (str): The stock ticker symbol (e.g., "AAPL" for Apple, "GOOGL" for Google).
|
| 44 |
-
|
| 45 |
-
Returns:
|
| 46 |
-
float: The current stock price of the given ticker symbol.
|
| 47 |
-
|
| 48 |
-
Example:
|
| 49 |
-
>>> get_current_price("AAPL")
|
| 50 |
-
150.25
|
| 51 |
-
"""
|
| 52 |
try:
|
| 53 |
# Fetch the stock data using yfinance
|
| 54 |
stock = yf.Ticker(ticker_symbol)
|
|
|
|
| 36 |
|
| 37 |
@tool
|
| 38 |
def get_current_price(ticker_symbol: str) -> float:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
try:
|
| 40 |
# Fetch the stock data using yfinance
|
| 41 |
stock = yf.Ticker(ticker_symbol)
|