cc1234 Claude commited on
Commit
b6b397a
·
1 Parent(s): 6dd3c99

feat: reorder visual search interface to show performer matches first

Browse files

Move performer information above detected faces gallery to reduce scrolling
and prioritize the most important information for users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. web/interface.py +6 -6
web/interface.py CHANGED
@@ -364,6 +364,10 @@ class WebInterface:
364
  search_btn = gr.Button("Search")
365
 
366
  with gr.Column():
 
 
 
 
367
  face_gallery = gr.Gallery(
368
  label="Detected Faces",
369
  show_label=True,
@@ -374,20 +378,16 @@ class WebInterface:
374
  object_fit="contain",
375
  allow_preview=True
376
  )
377
- performer_info = gr.HTML(
378
- label="Performer Information",
379
- value="<p>Upload an image and click search to see results.</p>"
380
- )
381
 
382
  def visual_search_wrapper(img, threshold, results):
383
  """Wrapper that returns only visual components"""
384
  json_results, gallery_images, html_content = self.multiple_image_search_with_visual(img, threshold, results)
385
- return gallery_images, html_content
386
 
387
  search_btn.click(
388
  fn=visual_search_wrapper,
389
  inputs=[img_input, threshold, results_count],
390
- outputs=[face_gallery, performer_info],
391
  api_name="multiple_image_search_with_visual"
392
  )
393
 
 
364
  search_btn = gr.Button("Search")
365
 
366
  with gr.Column():
367
+ performer_info = gr.HTML(
368
+ label="Performer Information",
369
+ value="<p>Upload an image and click search to see results.</p>"
370
+ )
371
  face_gallery = gr.Gallery(
372
  label="Detected Faces",
373
  show_label=True,
 
378
  object_fit="contain",
379
  allow_preview=True
380
  )
 
 
 
 
381
 
382
  def visual_search_wrapper(img, threshold, results):
383
  """Wrapper that returns only visual components"""
384
  json_results, gallery_images, html_content = self.multiple_image_search_with_visual(img, threshold, results)
385
+ return html_content, gallery_images
386
 
387
  search_btn.click(
388
  fn=visual_search_wrapper,
389
  inputs=[img_input, threshold, results_count],
390
+ outputs=[performer_info, face_gallery],
391
  api_name="multiple_image_search_with_visual"
392
  )
393