Spaces:
Runtime error
Runtime error
Commit
·
f736a5a
1
Parent(s):
2d1776b
add more explanation text'
Browse files
app.py
CHANGED
|
@@ -138,16 +138,18 @@ with gr.Blocks() as demo:
|
|
| 138 |
button.click(return_random_sample, [], [gallery])
|
| 139 |
with gr.Tab("image search"):
|
| 140 |
gr.Markdown(
|
| 141 |
-
"""## Image search
|
| 142 |
-
This is an image search.
|
| 143 |
You can search for images by entering a search term and clicking the search button.
|
| 144 |
-
You can also change the number of images to be returned.
|
|
|
|
| 145 |
)
|
| 146 |
text = gr.Textbox(label="Search for images")
|
| 147 |
k = gr.Slider(minimum=3, maximum=18, step=1)
|
| 148 |
button = gr.Button("search")
|
| 149 |
gallery = gr.Gallery().style(grid=3)
|
| 150 |
button.click(get_nearest_k_examples, [text, k], [gallery])
|
|
|
|
|
|
|
| 151 |
# with gr.Tab("Export for label studio"):
|
| 152 |
# button = gr.Button("Export")
|
| 153 |
# dataset2 = copy.deepcopy(dataset)
|
|
|
|
| 138 |
button.click(return_random_sample, [], [gallery])
|
| 139 |
with gr.Tab("image search"):
|
| 140 |
gr.Markdown(
|
| 141 |
+
"""## Image search
|
|
|
|
| 142 |
You can search for images by entering a search term and clicking the search button.
|
| 143 |
+
You can also change the number of images to be returned.
|
| 144 |
+
This model uses the [clip-ViT-B-16](https://huggingface.co/sentence-transformers/clip-ViT-B-16) model to embed your images and search term"""
|
| 145 |
)
|
| 146 |
text = gr.Textbox(label="Search for images")
|
| 147 |
k = gr.Slider(minimum=3, maximum=18, step=1)
|
| 148 |
button = gr.Button("search")
|
| 149 |
gallery = gr.Gallery().style(grid=3)
|
| 150 |
button.click(get_nearest_k_examples, [text, k], [gallery])
|
| 151 |
+
gr.Markdown("""### More info
|
| 152 |
+
""")
|
| 153 |
# with gr.Tab("Export for label studio"):
|
| 154 |
# button = gr.Button("Export")
|
| 155 |
# dataset2 = copy.deepcopy(dataset)
|