IPF commited on
Commit
9d7fa1d
·
verified ·
1 Parent(s): cfc887d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -59,14 +59,15 @@ scheduler = CommitScheduler(
59
 
60
  ########### vLLM Service Management ###########
61
  VLLM_MODEL_NAME = "AgentFlow/agentflow-planner-7b"
62
- VLLM_PORT = 8000
63
- VLLM_HOST = "localhost"
64
  VLLM_PROCESS = None
65
 
66
  def check_vllm_service() -> bool:
67
  """Check if vLLM service is running"""
68
  try:
69
- response = requests.get(f"http://{VLLM_HOST}:{VLLM_PORT}/v1/models", timeout=2)
 
70
  return response.status_code == 200
71
  except:
72
  return False
 
59
 
60
  ########### vLLM Service Management ###########
61
  VLLM_MODEL_NAME = "AgentFlow/agentflow-planner-7b"
62
+ VLLM_PORT = "Lambda"
63
+ VLLM_HOST = os.getenv("VLLM_HOST", "localhost")
64
  VLLM_PROCESS = None
65
 
66
  def check_vllm_service() -> bool:
67
  """Check if vLLM service is running"""
68
  try:
69
+ # response = requests.get(f"http://{VLLM_HOST}:{VLLM_PORT}/v1/models", timeout=2)
70
+ response = requests.get(f"http://{VLLM_HOST}/v1/models", timeout=2)
71
  return response.status_code == 200
72
  except:
73
  return False