vinid commited on
Commit
d8c3351
1 Parent(s): b05f3f7

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -27,12 +27,12 @@ def embed_texts(model, texts, processor):
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")
 
27
  )
28
  return embeddings
29
 
30
+ @st.cache_resource
31
  def load_embeddings(embeddings_path):
32
  print("loading embeddings")
33
  return np.load(embeddings_path)
34
 
35
+ @st.cache_resource
36
  def load_path_clip():
37
  model = VisionTextDualEncoderModel.from_pretrained("clip-italian/clip-italian")
38
  processor = AutoProcessor.from_pretrained("clip-italian/clip-italian")
requirements.txt CHANGED
@@ -4,4 +4,4 @@ transformers
4
  pandas
5
  numpy
6
  Pillow
7
- streamlit
 
4
  pandas
5
  numpy
6
  Pillow
7
+ streamlit==1.19.0