Bshraman commited on
Commit
e3e4798
·
verified ·
1 Parent(s): da05bc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -14
app.py CHANGED
@@ -3,7 +3,6 @@ import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
- import yfinance as yf
7
  from tools.final_answer import FinalAnswerTool
8
 
9
  from Gradio_UI import GradioUI
@@ -34,19 +33,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  except Exception as e:
35
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
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)
42
-
43
- # Get the current price (the last close price)
44
- current_price = stock.history(period="1d")['Close'].iloc[0]
45
-
46
- return float(current_price)
47
- except Exception as e:
48
- return f"Error fetching price for {ticker_symbol}: {str(e)}"
49
-
50
  final_answer = FinalAnswerTool()
51
 
52
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
 
3
  import requests
4
  import pytz
5
  import yaml
 
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
 
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  final_answer = FinalAnswerTool()
37
 
38
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder: