ceyda commited on
Commit
1bd7bf1
1 Parent(s): 579c59e

image width to column

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -66,7 +66,7 @@ Based on [paper:](https://openreview.net/forum?id=1Fqg133qRaI) *Towards Faster a
66
  picks=[False]*batch_size
67
  for j,im in enumerate(ims):
68
  i=j%col_num
69
- cols[i].image(im)
70
  picks[j]=cols[i].button("Find Nearest",key="pick_"+str(j))
71
 
72
  if any(picks):
@@ -75,7 +75,7 @@ Based on [paper:](https://openreview.net/forum?id=1Fqg133qRaI) *Towards Faster a
75
  if pick:
76
  scores, retrieved_examples=dataset.get_nearest_examples('beit_embeddings', embed(ims[i]), k=5)
77
  for r in retrieved_examples["image"]:
78
- cols[i].image(r)
79
  st.write("Nearest neighbors found in the training set according to L2 distance on 'microsoft/beit-base-patch16-224' embeddings")
80
  st.write(f"Latent dimension: {model.latent_dim}, image size:{model.image_size}")
81
 
 
66
  picks=[False]*batch_size
67
  for j,im in enumerate(ims):
68
  i=j%col_num
69
+ cols[i].image(im, use_column_width=True)
70
  picks[j]=cols[i].button("Find Nearest",key="pick_"+str(j))
71
 
72
  if any(picks):
 
75
  if pick:
76
  scores, retrieved_examples=dataset.get_nearest_examples('beit_embeddings', embed(ims[i]), k=5)
77
  for r in retrieved_examples["image"]:
78
+ cols[i].image(r, use_column_width=True)
79
  st.write("Nearest neighbors found in the training set according to L2 distance on 'microsoft/beit-base-patch16-224' embeddings")
80
  st.write(f"Latent dimension: {model.latent_dim}, image size:{model.image_size}")
81