kk20krishna commited on
Commit
aabbd28
·
verified ·
1 Parent(s): 3a19629

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,8 +25,8 @@ def get_nse_stock_price(stock_name: str) -> dict:
25
  - "Price Change" (float): The price difference from the previous close.
26
  - "% Change" (float): The percentage change from the previous close.
27
  """
28
- stock_symbol = stock_symbol.upper() # Ensure uppercase
29
- stock = yf.Ticker(stock_symbol + ".NS")
30
  data = stock.history(period='5d') # Get last 5 days to handle non-trading days
31
 
32
  if data.empty:
 
25
  - "Price Change" (float): The price difference from the previous close.
26
  - "% Change" (float): The percentage change from the previous close.
27
  """
28
+ stock_name = stock_name.upper() # Ensure uppercase
29
+ stock = yf.Ticker(stock_name + ".NS")
30
  data = stock.history(period='5d') # Get last 5 days to handle non-trading days
31
 
32
  if data.empty: