lukestanley commited on
Commit
52fc709
·
1 Parent(s): c4d55d5

Fix: when using http worker, only download if inference is on localhost

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -36,7 +36,7 @@ LLM_MODEL_PATH = env.get("LLM_MODEL_PATH", None)
36
  MAX_TOKENS = int(env.get("MAX_TOKENS", 1000))
37
  TEMPERATURE = float(env.get("TEMPERATURE", 0.3))
38
 
39
- performing_local_inference = (LLM_WORKER == "in_memory" or LLM_WORKER == "http")
40
 
41
  if LLM_MODEL_PATH and len(LLM_MODEL_PATH) > 0:
42
  print(f"Using local model from {LLM_MODEL_PATH}")
 
36
  MAX_TOKENS = int(env.get("MAX_TOKENS", 1000))
37
  TEMPERATURE = float(env.get("TEMPERATURE", 0.3))
38
 
39
+ performing_local_inference = (LLM_WORKER == "in_memory" or (LLM_WORKER == "http" and "localhost" in URL))
40
 
41
  if LLM_MODEL_PATH and len(LLM_MODEL_PATH) > 0:
42
  print(f"Using local model from {LLM_MODEL_PATH}")