Spaces:
Sleeping
Sleeping
Adding description
Browse files
app.py
CHANGED
@@ -79,9 +79,21 @@ def find_similar_images(text):
|
|
79 |
|
80 |
return top_images
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
text_input = gr.Textbox(label="Input text", placeholder="Enter the images description")
|
83 |
imgs_output = gr.Gallery(label="Top 4 most similar images")
|
84 |
|
85 |
-
intf = gr.Interface(fn=find_similar_images, inputs=text_input, outputs=imgs_output)
|
86 |
|
87 |
-
intf.launch(share=True)
|
|
|
79 |
|
80 |
return top_images
|
81 |
|
82 |
+
# Description of classes
|
83 |
+
description_text = """
|
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(fn=find_similar_images, inputs=text_input, outputs=imgs_output, description=description_text)
|
98 |
|
99 |
+
intf.launch(share=True)
|