Spaces:
Sleeping
Sleeping
showing labels
Browse files- 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 |
-
|
51 |
-
"Vision x Text: ",
|
52 |
-
torch.softmax(embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1),
|
53 |
-
)
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
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")
|