Rajagopal commited on
Commit
b68d4a2
·
1 Parent(s): fa813bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -92,18 +92,11 @@ def doubleimage_text_zeroshot(image, image2, text_list):
92
 
93
  with torch.no_grad():
94
  embeddings = model(inputs)
95
-
96
- scores = (
97
- torch.softmax(
98
- embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1
99
- )
100
- .squeeze(0)
101
- .tolist()
102
  )
103
 
104
- score_dict = {label: score for label, score in zip(labels, scores)}
105
 
106
- return scores
107
 
108
 
109
 
 
92
 
93
  with torch.no_grad():
94
  embeddings = model(inputs)
95
+
 
 
 
 
 
 
96
  )
97
 
 
98
 
99
+ return str(torch.softmax(embeddings[ModalityType.VISION] @ embeddings[ModalityType.TEXT].T, dim=-1) )
100
 
101
 
102