multimodalart HF Staff commited on
Commit
1dc2ce2
·
verified ·
1 Parent(s): 82416f7

Grounded examples (video-frame positive refs), tighten GPU duration to measured 30s

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -145,7 +145,7 @@ def highlight_tags(caption: str) -> str:
145
  # ---------------------------------------------------------------------------
146
  # Inference
147
  # ---------------------------------------------------------------------------
148
- @spaces.GPU(duration=120)
149
  def generate_caption(
150
  video,
151
  ref_1,
@@ -291,12 +291,12 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
291
 
292
  gr.Examples(
293
  examples=[
294
- # border collie running through a barley field; refs: a golden-retriever-like dog
295
- # (loose visual match the model may or may not ground) + a husky (clear distractor).
296
- ["examples/border_collie_running.mp4", "examples/dog.jpg", "examples/husky_dog.jpg"],
297
- # man jumping rope on a city sidewalk; refs: white sneakers (worn in the video)
298
- # + a night city skyline (distractor — the video is daytime, no skyline).
299
- ["examples/man_jumping_rope.mp4", "examples/sneakers_white_studio.jpg", "examples/city_skyline_night.jpg"],
300
  ],
301
  # Examples fill video + <Image_1> + <Image_2>; ref_3..ref_6 stay at their defaults.
302
  inputs=[video_in, r1, r2],
 
145
  # ---------------------------------------------------------------------------
146
  # Inference
147
  # ---------------------------------------------------------------------------
148
+ @spaces.GPU(duration=30)
149
  def generate_caption(
150
  video,
151
  ref_1,
 
291
 
292
  gr.Examples(
293
  examples=[
294
+ # Border collie running through a field. <Image_1> is a frame of the
295
+ # same dog (grounded); <Image_2> is a husky (distractor, omitted).
296
+ ["examples/border_collie_running.mp4", "examples/collie_frame.jpg", "examples/husky_dog.jpg"],
297
+ # Man jumping rope on a sidewalk. <Image_1> is a frame of the same
298
+ # man (grounded); <Image_2> is a night skyline (distractor, omitted).
299
+ ["examples/man_jumping_rope.mp4", "examples/jump_rope_frame.jpg", "examples/city_skyline_night.jpg"],
300
  ],
301
  # Examples fill video + <Image_1> + <Image_2>; ref_3..ref_6 stay at their defaults.
302
  inputs=[video_in, r1, r2],