Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,7 @@ def get_image_embs(image):
|
|
139 |
Returns:
|
140 |
img_emb (np.array): Image embeddings
|
141 |
"""
|
142 |
-
img_emb =
|
143 |
return img_emb
|
144 |
|
145 |
@st.cache_data(show_spinner=False)
|
@@ -231,7 +231,8 @@ def image_to_image(image, k=5):
|
|
231 |
|
232 |
dataset = load_dataset()
|
233 |
df = load_dataframe(dataset)
|
234 |
-
|
|
|
235 |
|
236 |
st.title("#ditaduranuncamais Data Explorer")
|
237 |
|
|
|
139 |
Returns:
|
140 |
img_emb (np.array): Image embeddings
|
141 |
"""
|
142 |
+
img_emb = image_model.encode(image, convert_to_tensor=True)
|
143 |
return img_emb
|
144 |
|
145 |
@st.cache_data(show_spinner=False)
|
|
|
231 |
|
232 |
dataset = load_dataset()
|
233 |
df = load_dataframe(dataset)
|
234 |
+
image_model = load_image_model()
|
235 |
+
text_model = load_text_model()
|
236 |
|
237 |
st.title("#ditaduranuncamais Data Explorer")
|
238 |
|