Spaces:
Running on Zero

vtwo commited on
Commit
e63fb1d
·
verified ·
1 Parent(s): d8d21fa

Placeholder text in the empty frames gallery

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -367,6 +367,11 @@ CSS = """
367
  #answer tbody tr:last-child td { border-bottom: 1.5px solid var(--body-text-color) !important; }
368
  #answer td strong { color: var(--st-accent); font-size: 1.05rem; }
369
  #answer td:last-child { color: var(--body-text-color-subdued); font-size: 0.85rem; }
 
 
 
 
 
370
  #notes { font-size: 0.8rem; color: var(--body-text-color-subdued); border-top: 1px solid var(--border-color-primary);
371
  padding-top: 12px; margin-top: 8px; max-width: 96ch; }
372
  #notes a { color: var(--st-accent); padding: 0; }
@@ -392,7 +397,7 @@ with gr.Blocks(title="SpaceTimeVLM") as demo:
392
  inputs=[video, question], cache_examples=False, label="Or try the example video with a question")
393
  with gr.Column(scale=6):
394
  result = gr.Markdown(NO_ANSWER_YET, label="Answer", elem_id="answer")
395
- seen = gr.Gallery(label="Frames the model saw", columns=4, height="auto", object_fit="cover")
396
  with gr.Accordion("How it works", open=False):
397
  gr.Markdown(HOW_IT_WORKS)
398
  gr.HTML(NOTES, elem_classes="flush")
 
367
  #answer tbody tr:last-child td { border-bottom: 1.5px solid var(--body-text-color) !important; }
368
  #answer td strong { color: var(--st-accent); font-size: 1.05rem; }
369
  #answer td:last-child { color: var(--body-text-color-subdued); font-size: 0.85rem; }
370
+ /* placeholder of the empty gallery: a line of text under its icon */
371
+ #seen .empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
372
+ min-height: 200px; }
373
+ #seen .empty::after { content: "The frames sampled from your video appear here."; font-size: 0.9rem;
374
+ color: var(--body-text-color-subdued); text-align: center; padding: 0 16px; }
375
  #notes { font-size: 0.8rem; color: var(--body-text-color-subdued); border-top: 1px solid var(--border-color-primary);
376
  padding-top: 12px; margin-top: 8px; max-width: 96ch; }
377
  #notes a { color: var(--st-accent); padding: 0; }
 
397
  inputs=[video, question], cache_examples=False, label="Or try the example video with a question")
398
  with gr.Column(scale=6):
399
  result = gr.Markdown(NO_ANSWER_YET, label="Answer", elem_id="answer")
400
+ seen = gr.Gallery(label="Frames the model saw", columns=4, height="auto", object_fit="cover", elem_id="seen")
401
  with gr.Accordion("How it works", open=False):
402
  gr.Markdown(HOW_IT_WORKS)
403
  gr.HTML(NOTES, elem_classes="flush")