katerinavr commited on
Commit
8201fe8
1 Parent(s): 92aacef

Add requirements

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -19,7 +19,8 @@ model = SentenceTransformer('clip-ViT-B-32')
19
  #Open the precomputed embeddings
20
  #emb_filename = 'unsplash-25k-photos-embeddings.pkl'
21
  ds_with_embeddings = load_dataset("kvriza8/image-embeddings", use_auth_token=True)
22
- img_names, img_emb = ds_with_embeddings['train']['image'], ds_with_embeddings['train']['embeddings']
 
23
  # with open(emb_filename, 'rb') as fIn:
24
  # img_names, img_emb = pickle.load(fIn)
25
  # #print(f'img_emb: {print(img_emb)}')
 
19
  #Open the precomputed embeddings
20
  #emb_filename = 'unsplash-25k-photos-embeddings.pkl'
21
  ds_with_embeddings = load_dataset("kvriza8/image-embeddings", use_auth_token=True)
22
+ ds_with_embeddings['train'].add_faiss_index(column='embeddings')
23
+ # img_names, img_emb = ds_with_embeddings['train']['image'], ds_with_embeddings['train']['embeddings']
24
  # with open(emb_filename, 'rb') as fIn:
25
  # img_names, img_emb = pickle.load(fIn)
26
  # #print(f'img_emb: {print(img_emb)}')
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  transformers
2
  sentence-transformers
3
  torch
4
- gradio
 
 
1
  transformers
2
  sentence-transformers
3
  torch
4
+ gradio
5
+ faiss