taigasan commited on
Commit
c9db651
·
verified ·
1 Parent(s): 49a1c74

deploy app, storage, readme

Browse files
Files changed (2) hide show
  1. app.py +13 -0
  2. explorer.py +1 -0
app.py CHANGED
@@ -482,6 +482,19 @@ with gr.Blocks(
482
  border-radius: 8px;
483
  font-size: 0.92rem;
484
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  """,
486
  ) as demo:
487
  state = gr.State({})
 
482
  border-radius: 8px;
483
  font-size: 0.92rem;
484
  }
485
+ #results-gallery {
486
+ --explorer-thumb-ratio: 1 / 1;
487
+ }
488
+ #results-gallery button,
489
+ #results-gallery .thumbnail-item {
490
+ aspect-ratio: var(--explorer-thumb-ratio) !important;
491
+ }
492
+ #results-gallery img {
493
+ width: 100% !important;
494
+ height: 100% !important;
495
+ object-fit: contain !important;
496
+ background: #1f2937;
497
+ }
498
  """,
499
  ) as demo:
500
  state = gr.State({})
explorer.py CHANGED
@@ -152,6 +152,7 @@ def add_results_tab(pool_df: pd.DataFrame):
152
  object_fit="contain",
153
  preview=True,
154
  height="auto",
 
155
  )
156
  results_load_more_btn = gr.Button("Load more (ArrowDown)", elem_id="btn-results-load-more")
157
  selected_image_md = gr.Markdown("Click an image to reveal its ID and link.")
 
152
  object_fit="contain",
153
  preview=True,
154
  height="auto",
155
+ elem_id="results-gallery",
156
  )
157
  results_load_more_btn = gr.Button("Load more (ArrowDown)", elem_id="btn-results-load-more")
158
  selected_image_md = gr.Markdown("Click an image to reveal its ID and link.")