Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,8 @@ import pytz
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
#import yfinance as yf
|
|
|
|
|
|
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
|
@@ -39,15 +41,10 @@ final_answer = FinalAnswerTool()
|
|
| 39 |
|
| 40 |
|
| 41 |
@tool
|
| 42 |
-
import requests
|
| 43 |
-
import logging
|
| 44 |
-
from typing import Optional, Dict, Any
|
| 45 |
-
|
| 46 |
-
logger = logging.getLogger(__name__)
|
| 47 |
-
logger.setLevel(logging.DEBUG)
|
| 48 |
-
|
| 49 |
-
|
| 50 |
def get_current_stock_price(ticker_symbol: str) -> Optional[Dict[str, Any]]:
|
|
|
|
|
|
|
|
|
|
| 51 |
"""
|
| 52 |
Get the latest stock price for the given ticker symbol by querying Yahoo Finance directly,
|
| 53 |
then calculate the price change over the last 5 days (percentage and absolute).
|
|
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
#import yfinance as yf
|
| 8 |
+
import logging
|
| 9 |
+
from typing import Optional, Dict, Any
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
|
|
|
| 41 |
|
| 42 |
|
| 43 |
@tool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
def get_current_stock_price(ticker_symbol: str) -> Optional[Dict[str, Any]]:
|
| 45 |
+
logger = logging.getLogger(__name__)
|
| 46 |
+
logger.setLevel(logging.DEBUG)
|
| 47 |
+
|
| 48 |
"""
|
| 49 |
Get the latest stock price for the given ticker symbol by querying Yahoo Finance directly,
|
| 50 |
then calculate the price change over the last 5 days (percentage and absolute).
|