Spaces:
Runtime error
Runtime error
sashavor
commited on
Commit
Β·
b597545
1
Parent(s):
d5a4d39
changing to slugs
Browse files- README.md +2 -2
- app.py +4 -4
- lsh.pickle +0 -3
- index_768_cosine.pickle β slugs_index_1024_cosine.pickle +2 -2
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title: Find
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Find my Sea Slug π
|
| 3 |
+
emoji: π
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from transformers import AutoModel, AutoFeatureExtractor
|
|
| 5 |
|
| 6 |
|
| 7 |
# Only runs once when the script is first run.
|
| 8 |
-
with open("
|
| 9 |
index = pickle.load(handle)
|
| 10 |
|
| 11 |
# Load model for computing embeddings.
|
|
@@ -33,12 +33,12 @@ def query(image, top_k=4):
|
|
| 33 |
|
| 34 |
|
| 35 |
with gr.Blocks() as demo:
|
| 36 |
-
gr.Markdown("# Find my
|
| 37 |
-
gr.Markdown("## Use this Space to find your
|
| 38 |
with gr.Row():
|
| 39 |
with gr.Column(min_width= 900):
|
| 40 |
inputs = gr.Image(shape=(800, 1600))
|
| 41 |
-
btn = gr.Button("Find my
|
| 42 |
with gr.Column():
|
| 43 |
outputs=gr.Gallery().style(grid=[2], height="auto")
|
| 44 |
labels = gr.Label()
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
# Only runs once when the script is first run.
|
| 8 |
+
with open("slugs_index_1024_cosine.pickle", "rb") as handle:
|
| 9 |
index = pickle.load(handle)
|
| 10 |
|
| 11 |
# Load model for computing embeddings.
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
with gr.Blocks() as demo:
|
| 36 |
+
gr.Markdown("# Find my Sea Slug π")
|
| 37 |
+
gr.Markdown("## Use this Space to find your sea slug, based on the [Nudibranchs of the Sunshine Coast Australia dataset](https://huggingface.co/datasets/sasha/australian_sea_slugs)!")
|
| 38 |
with gr.Row():
|
| 39 |
with gr.Column(min_width= 900):
|
| 40 |
inputs = gr.Image(shape=(800, 1600))
|
| 41 |
+
btn = gr.Button("Find my sea slug π!")
|
| 42 |
with gr.Column():
|
| 43 |
outputs=gr.Gallery().style(grid=[2], height="auto")
|
| 44 |
labels = gr.Label()
|
lsh.pickle
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:caa1727832f2279a4026b03b9f17638ff4a4deffa0a28586e74db59332dce732
|
| 3 |
-
size 136667
|
|
|
|
|
|
|
|
|
|
|
|
index_768_cosine.pickle β slugs_index_1024_cosine.pickle
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:001614717d03b205fa782c2e3f04b7556813d778be55e27426c6590b86a1a5c5
|
| 3 |
+
size 20725122
|