Spaces:
Sleeping
Sleeping
Update to description
Browse files
app.py
CHANGED
@@ -79,21 +79,21 @@ def find_similar_images(text):
|
|
79 |
|
80 |
return top_images
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
This application classifies images into one of four classes:
|
85 |
-
- **Deer**: Images containing deer or related visuals.
|
86 |
-
- **Rabbit**: Images containing rabbits or similar visuals.
|
87 |
-
- **Dog**: Images containing various dog breeds.
|
88 |
-
- **Shark**: Images with sharks or related visuals.
|
89 |
-
|
90 |
-
Enter a description, and the model will return the top 4 most similar images.
|
91 |
-
"""
|
92 |
-
|
93 |
-
# Interface setup
|
94 |
text_input = gr.Textbox(label="Input text", placeholder="Enter the images description")
|
95 |
imgs_output = gr.Gallery(label="Top 4 most similar images")
|
96 |
|
97 |
-
intf = gr.Interface(
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
return top_images
|
81 |
|
82 |
+
|
83 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
text_input = gr.Textbox(label="Input text", placeholder="Enter the images description")
|
85 |
imgs_output = gr.Gallery(label="Top 4 most similar images")
|
86 |
|
87 |
+
intf = gr.Interface(
|
88 |
+
fn=find_similar_images,
|
89 |
+
inputs=gr.Textbox(label="Input Text", placeholder="Enter a description"),
|
90 |
+
outputs=gr.Gallery(label="Top 4 Similar Images"),
|
91 |
+
)
|
92 |
+
extra_text = gr.Markdown("""
|
93 |
+
The dataset contains images of dogs, rabbits, sharks, and deer.
|
94 |
+
Displaying the images might take a couple of seconds.
|
95 |
+
""")
|
96 |
+
with gr.Blocks() as app:
|
97 |
+
intf.render()
|
98 |
+
extra_text.render()
|
99 |
+
app.launch(share=True)
|