Daniel Varga commited on
Commit
ae27165
·
1 Parent(s): ae2c23b

ui cleanup

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -155,21 +155,16 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
155
 
156
  with gr.Row(variant="compact"):
157
  text = gr.Textbox(
158
- label="Enter your prompt",
159
  show_label=False,
160
  max_lines=1,
161
  placeholder="Enter your prompt",
162
  ).style(container=False)
163
  text_query_button = gr.Button("Search").style(full_width=False)
164
 
165
- with gr.Row():
166
- show_folder_button = gr.Button("Show folder")
167
- image_query_button = gr.Button("Show similar")
168
- selected = gr.Number(0, show_label=False, visible=False)
169
-
170
- uploaded_image = gr.Image(tool="select", type="pil")
171
-
172
- query_uploaded_image_button = gr.Button("Show similiar to uploaded")
173
 
174
  gallery = gr.Gallery(label="Images", show_label=False, elem_id="gallery"
175
  ).style(columns=4, container=False)
@@ -177,6 +172,11 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
177
  with gr.Row():
178
  filename_textbox = gr.Textbox("", show_label=False).style(container=False)
179
 
 
 
 
 
 
180
  text_query_button.click(image_retrieval_from_text, [text], [gallery, state])
181
  image_query_button.click(image_retrieval_from_image, [state, selected], [gallery, state])
182
  show_folder_button.click(show_folder, [state, selected], [gallery, state])
 
155
 
156
  with gr.Row(variant="compact"):
157
  text = gr.Textbox(
158
+ label="Enter search query",
159
  show_label=False,
160
  max_lines=1,
161
  placeholder="Enter your prompt",
162
  ).style(container=False)
163
  text_query_button = gr.Button("Search").style(full_width=False)
164
 
165
+ with gr.Row(variant="compact"):
166
+ uploaded_image = gr.Image(tool="select", type="pil", show_label=False)
167
+ query_uploaded_image_button = gr.Button("Show similiar to uploaded")
 
 
 
 
 
168
 
169
  gallery = gr.Gallery(label="Images", show_label=False, elem_id="gallery"
170
  ).style(columns=4, container=False)
 
172
  with gr.Row():
173
  filename_textbox = gr.Textbox("", show_label=False).style(container=False)
174
 
175
+ with gr.Row():
176
+ show_folder_button = gr.Button("Show folder of selected")
177
+ image_query_button = gr.Button("Show similar to selected")
178
+ selected = gr.Number(0, show_label=False, visible=False)
179
+
180
  text_query_button.click(image_retrieval_from_text, [text], [gallery, state])
181
  image_query_button.click(image_retrieval_from_image, [state, selected], [gallery, state])
182
  show_folder_button.click(show_folder, [state, selected], [gallery, state])