system HF Staff commited on
Commit
50ba853
·
verified ·
1 Parent(s): 56749a4

deploy: sync encoder from 240af2d

Browse files
Files changed (1) hide show
  1. text_encoder.py +2 -1
text_encoder.py CHANGED
@@ -36,7 +36,8 @@ _TOKENIZER = None
36
 
37
 
38
  def load_session() -> ort.InferenceSession:
39
- """Download (HF-hub-cached) the text ONNX and build a CPU session once."""
 
40
  global _SESSION
41
  if _SESSION is None:
42
  path = hf_hub_download(MODEL_REPO, ONNX_FILE)
 
36
 
37
 
38
  def load_session() -> ort.InferenceSession:
39
+ """Resolve the text ONNX (baked into the image in production, HF-hub-cached
40
+ elsewhere) and build a CPU session once."""
41
  global _SESSION
42
  if _SESSION is None:
43
  path = hf_hub_download(MODEL_REPO, ONNX_FILE)