Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,12 @@ def embed_texts(model, texts, processor):
|
|
27 |
)
|
28 |
return embeddings
|
29 |
|
30 |
-
@st.
|
31 |
def load_embeddings(embeddings_path):
|
32 |
print("loading embeddings")
|
33 |
return np.load(embeddings_path)
|
34 |
|
35 |
-
@st.
|
36 |
def load_path_clip():
|
37 |
model = VisionTextDualEncoderModel.from_pretrained("clip-italian/clip-italian")
|
38 |
processor = AutoProcessor.from_pretrained("clip-italian/clip-italian")
|
|
|
27 |
)
|
28 |
return embeddings
|
29 |
|
30 |
+
@st.cache
|
31 |
def load_embeddings(embeddings_path):
|
32 |
print("loading embeddings")
|
33 |
return np.load(embeddings_path)
|
34 |
|
35 |
+
@st.cache
|
36 |
def load_path_clip():
|
37 |
model = VisionTextDualEncoderModel.from_pretrained("clip-italian/clip-italian")
|
38 |
processor = AutoProcessor.from_pretrained("clip-italian/clip-italian")
|