licmajster commited on
Commit
734f486
·
verified ·
1 Parent(s): 72d32f9

Update to description

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -79,21 +79,21 @@ def find_similar_images(text):
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)
 
 
 
 
 
 
 
 
 
 
 
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)