zaheer140 commited on
Commit
c0d87c5
·
verified ·
1 Parent(s): 5b6a4d4

Update agents/telemetry/app/services/router.py

Browse files
agents/telemetry/app/services/router.py CHANGED
@@ -32,7 +32,10 @@ class RouterService:
32
  self.model = os.getenv("GROQ_MODEL", "llama-3.3-70b-versatile")
33
 
34
  # Hugging Face uses port 7860, locally we default to 8000
35
- port = os.getenv("PORT", "8000")
 
 
 
36
 
37
  self.live_agent_url = os.getenv("LIVE_AGENT_URL", f"http://127.0.0.1:{port}/live")
38
  self.analysis_agent_url = os.getenv("ANALYSIS_AGENT_URL", f"http://127.0.0.1:{port}/analysis")
 
32
  self.model = os.getenv("GROQ_MODEL", "llama-3.3-70b-versatile")
33
 
34
  # Hugging Face uses port 7860, locally we default to 8000
35
+ if os.getenv("SPACE_ID"):
36
+ port = "7860"
37
+ else:
38
+ port = os.getenv("PORT", "8000")
39
 
40
  self.live_agent_url = os.getenv("LIVE_AGENT_URL", f"http://127.0.0.1:{port}/live")
41
  self.analysis_agent_url = os.getenv("ANALYSIS_AGENT_URL", f"http://127.0.0.1:{port}/analysis")