Spaces:
Runtime error
Runtime error
Merge branch 'main' of https://huggingface.co/spaces/huggan/butterfly-gan into main
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ Based on [paper:](https://openreview.net/forum?id=1Fqg133qRaI) *Towards Faster a
|
|
75 |
picks=[False]*batch_size
|
76 |
for j,im in enumerate(ims):
|
77 |
i=j%col_num
|
78 |
-
cols[i].image(im)
|
79 |
picks[j]=cols[i].button("Find Nearest",key="pick_"+str(j))
|
80 |
|
81 |
if any(picks):
|
@@ -84,7 +84,7 @@ Based on [paper:](https://openreview.net/forum?id=1Fqg133qRaI) *Towards Faster a
|
|
84 |
if pick:
|
85 |
scores, retrieved_examples=dataset.get_nearest_examples('beit_embeddings', embed(ims[i]), k=5)
|
86 |
for r in retrieved_examples["image"]:
|
87 |
-
cols[i].image(r)
|
88 |
st.write("Nearest neighbors found in the training set according to L2 distance on 'microsoft/beit-base-patch16-224' embeddings")
|
89 |
st.write(f"Latent dimension: {model.latent_dim}, image size:{model.image_size}")
|
90 |
|
|
|
75 |
picks=[False]*batch_size
|
76 |
for j,im in enumerate(ims):
|
77 |
i=j%col_num
|
78 |
+
cols[i].image(im, use_column_width=True)
|
79 |
picks[j]=cols[i].button("Find Nearest",key="pick_"+str(j))
|
80 |
|
81 |
if any(picks):
|
|
|
84 |
if pick:
|
85 |
scores, retrieved_examples=dataset.get_nearest_examples('beit_embeddings', embed(ims[i]), k=5)
|
86 |
for r in retrieved_examples["image"]:
|
87 |
+
cols[i].image(r, use_column_width=True)
|
88 |
st.write("Nearest neighbors found in the training set according to L2 distance on 'microsoft/beit-base-patch16-224' embeddings")
|
89 |
st.write(f"Latent dimension: {model.latent_dim}, image size:{model.image_size}")
|
90 |
|