You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FlagEmbedding/visual/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ import torch
64
64
from FlagEmbedding.visual.modeling import Visualized_BGE
65
65
66
66
model = Visualized_BGE(model_name_bge="BAAI/bge-base-en-v1.5", model_weight="path: Visualized_base_en_v1.5.pth")
67
-
67
+
model.eval()
68
68
with torch.no_grad():
69
69
query_emb = model.encode(text="Are there sidewalks on both sides of the Mid-Hudson Bridge?")
70
70
candi_emb_1 = model.encode(text="The Mid-Hudson Bridge, spanning the Hudson River between Poughkeepsie and Highland.", image="./imgs/wiki_candi_1.jpg")
0 commit comments