hung-k-nguyen commited on
Commit
46b12e1
·
verified ·
1 Parent(s): b137257

Demo: v2 head -> weights/head.onnx

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -137,7 +137,7 @@ def _ensure_v2():
137
  dl = lambda f: hf_hub_download(V2_PRIV, f, repo_type="model", token=TOKEN)
138
  _V2["img"] = _ort(dl("weights/image_encoder.onnx")) # pixel_values -> pooled patches [1,256,1152]
139
  _V2["txt"] = _ort(dl("weights/text_encoder.onnx")) # input_ids/mask -> L2 label embeds [N,1024]
140
- _V2["head"] = _ort(dl("weights/head-v3-ep6.onnx")) # patches + label_embeds -> probs
141
  _V2["ip"] = AutoImageProcessor.from_pretrained(V2_PRIV, subfolder="encoder/image", token=TOKEN)
142
  _V2["tk"] = AutoTokenizer.from_pretrained(V2_PRIV, subfolder="encoder/text", token=TOKEN)
143
  except Exception as e: # noqa: BLE001
 
137
  dl = lambda f: hf_hub_download(V2_PRIV, f, repo_type="model", token=TOKEN)
138
  _V2["img"] = _ort(dl("weights/image_encoder.onnx")) # pixel_values -> pooled patches [1,256,1152]
139
  _V2["txt"] = _ort(dl("weights/text_encoder.onnx")) # input_ids/mask -> L2 label embeds [N,1024]
140
+ _V2["head"] = _ort(dl("weights/head.onnx")) # patches + label_embeds -> probs
141
  _V2["ip"] = AutoImageProcessor.from_pretrained(V2_PRIV, subfolder="encoder/image", token=TOKEN)
142
  _V2["tk"] = AutoTokenizer.from_pretrained(V2_PRIV, subfolder="encoder/text", token=TOKEN)
143
  except Exception as e: # noqa: BLE001