Spaces:
Sleeping
Sleeping
Update app.py
Browse files20 unmodified lines2122232424252627282920 unmodified lines end_date = datetime.now().strftime("%Y-%m-%d") ticker = yf.Ticker(symbol) df = ticker.history(start=start_date, end=end_date, auto_adjust=True) return f"Today's Stock data for {symbol}:Open : {df['Open'].iloc[0]} High : {df['High'].iloc[0]} Low : {df['Low'].iloc[0]} Close : {df['Open'].iloc[0] Volume : {df['Volume'].iloc[0]}" return f""" Today's Stock data for {symbol}:Open : {df['Open'].iloc[0]} High : {df['High'].iloc[0]} Low : {df['Low'].iloc[0]} Close : {df['Open'].iloc[0] Volume : {df['Volume'].iloc[0]} """ except Exception as e: return f"Error fetching stock data for {symbol}: {str(e)}"
app.py+3-1