Vidushee commited on
Commit
79535f4
1 Parent(s): f779c8f

showing labels

Browse files
Files changed (1) hide show
  1. Zocket_ImageBind.py +5 -5
Zocket_ImageBind.py CHANGED
@@ -47,9 +47,9 @@ if uploaded_image is not None:
47
  with torch.no_grad():
48
  embeddings = model(inputs)
49
 
50
- print(
51
- "Vision x Text: ",
52
- torch.softmax(embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1),
53
- )
54
 
55
- st.write(torch.softmax(embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1))
 
 
 
 
47
  with torch.no_grad():
48
  embeddings = model(inputs)
49
 
50
+ softmax_output = torch.softmax(embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1)
 
 
 
51
 
52
+ if softmax_output[0] > softmax_output[1]:
53
+ st.write("Advertisement")
54
+ else:
55
+ st.write("Not an Advertisement")