Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def find_similar(img, top_k):
|
|
| 44 |
Image.fromarray((X_ref[i].reshape(28, 28) * 255).astype(np.uint8))
|
| 45 |
for i in top_idx
|
| 46 |
]
|
| 47 |
-
return table,
|
| 48 |
|
| 49 |
with gr.Blocks() as demo:
|
| 50 |
|
|
@@ -69,6 +69,6 @@ with gr.Blocks() as demo:
|
|
| 69 |
interactive=False
|
| 70 |
)
|
| 71 |
|
| 72 |
-
btn.click(find_similar, inputs=[canvas, topk], outputs=[results,
|
| 73 |
|
| 74 |
demo.launch(server_port=7860)
|
|
|
|
| 44 |
Image.fromarray((X_ref[i].reshape(28, 28) * 255).astype(np.uint8))
|
| 45 |
for i in top_idx
|
| 46 |
]
|
| 47 |
+
return table, gallery_imgs
|
| 48 |
|
| 49 |
with gr.Blocks() as demo:
|
| 50 |
|
|
|
|
| 69 |
interactive=False
|
| 70 |
)
|
| 71 |
|
| 72 |
+
btn.click(find_similar, inputs=[canvas, topk], outputs=[results, gallery])
|
| 73 |
|
| 74 |
demo.launch(server_port=7860)
|