Spaces:
Build error
Build error
Commit
·
40a7087
1
Parent(s):
bb51e19
app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def encode_search_query(search_query, model):
|
|
44 |
#inputs = tokenizer([search_query], padding=True, return_tensors="pt")
|
45 |
inputs = processor(text=[search_query], images=None, return_tensors="pt", padding=True)
|
46 |
text_features = model.get_text_features(**inputs).detach().numpy()
|
47 |
-
return text_features
|
48 |
|
49 |
# Find all matched photos
|
50 |
def find_matches(text_features, photo_features, photo_ids, results_count=4):
|
|
|
44 |
#inputs = tokenizer([search_query], padding=True, return_tensors="pt")
|
45 |
inputs = processor(text=[search_query], images=None, return_tensors="pt", padding=True)
|
46 |
text_features = model.get_text_features(**inputs).detach().numpy()
|
47 |
+
return np.array(text_features)
|
48 |
|
49 |
# Find all matched photos
|
50 |
def find_matches(text_features, photo_features, photo_ids, results_count=4):
|