akpande2 commited on
Commit
9c5db51
·
verified ·
1 Parent(s): 75f996e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -0
main.py CHANGED
@@ -15,6 +15,16 @@ pipeline_engine = None
15
  async def startup_event():
16
  global pipeline_engine
17
  token = os.environ.get("HF_TOKEN")
 
 
 
 
 
 
 
 
 
 
18
  print("Initializing UltraRobustCallAnalytics...")
19
  pipeline_engine = UltraRobustCallAnalytics(hf_token=token)
20
  print("Pipeline initialized successfully!")
 
15
  async def startup_event():
16
  global pipeline_engine
17
  token = os.environ.get("HF_TOKEN")
18
+ print(f"🔍 DEBUG: Checking for Token...")
19
+ if token is None:
20
+ print("❌ ERROR: HF_TOKEN is None! The app cannot read the secret.")
21
+ print(f" Available Environment Keys: {[k for k in os.environ.keys() if 'HF' in k]}")
22
+ elif len(token) < 10:
23
+ print("❌ ERROR: Token seems too short or invalid.")
24
+ else:
25
+ print(f"✅ Token found! Starts with: {token[:4]}...")
26
+
27
+ # 3. Initialize
28
  print("Initializing UltraRobustCallAnalytics...")
29
  pipeline_engine = UltraRobustCallAnalytics(hf_token=token)
30
  print("Pipeline initialized successfully!")