Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -54,12 +54,12 @@ row_size = 5
|
|
54 |
|
55 |
def f(im):
|
56 |
D, I = index.search(get_emb(im), n_outputs)
|
57 |
-
return [f"Distance: {d}\n
|
60 |
with gr.Blocks() as demo:
|
61 |
gr.Markdown(
|
62 |
-
"# Style Similarity Search\n\nFind artworks with a similar style from a medium database (10k artists * 30 img/artist)"
|
63 |
)
|
64 |
img = gr.Image(type="pil", label="Query", height=500)
|
65 |
btn = gr.Button(variant="primary", value="search")
|
|
|
54 |
|
55 |
def f(im):
|
56 |
D, I = index.search(get_emb(im), n_outputs)
|
57 |
+
return [f"Distance: {d}\n" for d, i in zip(D[0], I[0])]
|
58 |
|
59 |
print("preparing gradio")
|
60 |
with gr.Blocks() as demo:
|
61 |
gr.Markdown(
|
62 |
+
"# Style Similarity Search\n\nFind artworks with a similar style from a medium-sized database (10k artists * 30 img/artist)"
|
63 |
)
|
64 |
img = gr.Image(type="pil", label="Query", height=500)
|
65 |
btn = gr.Button(variant="primary", value="search")
|