danielthatu12 commited on
Commit
97bc428
·
verified ·
1 Parent(s): 12768a4

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -37,7 +37,7 @@ nltk.download("vader_lexicon", quiet=True)
37
  # =============================================================================
38
  # API Keys (Replace with your own keys)
39
  # =============================================================================
40
- ALPHAVANTAGE_API_KEY = "DDKHTD50P1FS30WL"
41
  FINNHUB_API_KEY = "cu5gvghr01qqj8u6iau0cu5gvghr01qqj8u6iaug"
42
 
43
  # =============================================================================
@@ -63,7 +63,7 @@ def fetch_stock_data(symbol, outputsize="full"):
63
  elif "Note" in data:
64
  raise ValueError("API request limit reached. Please try again in a minute.")
65
  elif "Information" in data:
66
- raise ValueError(f"Alpha Vantage API daily limit reached. Please try again tomorrow. Details: {data['Information']}")
67
  else:
68
  raise ValueError(
69
  f"Unable to fetch data for symbol '{symbol}'. Please verify the symbol.")
 
37
  # =============================================================================
38
  # API Keys (Replace with your own keys)
39
  # =============================================================================
40
+ ALPHAVANTAGE_API_KEY = "IELF382B4X42YRTX"
41
  FINNHUB_API_KEY = "cu5gvghr01qqj8u6iau0cu5gvghr01qqj8u6iaug"
42
 
43
  # =============================================================================
 
63
  elif "Note" in data:
64
  raise ValueError("API request limit reached. Please try again in a minute.")
65
  elif "Information" in data:
66
+ raise ValueError(f"Your application is actually working perfectly. The prediction failed exactly when it was supposed to, because your API key ({ALPHAVANTAGE_API_KEY}) has genuinely maxed out its 25 free requests for today.")
67
  else:
68
  raise ValueError(
69
  f"Unable to fetch data for symbol '{symbol}'. Please verify the symbol.")