Spaces:
Running on Zero
Running on Zero
Commit ·
8ea1ec9
1
Parent(s): 15a7846
add hockey examples
Browse files- app.py +4 -2
- example-videos/us_canada_hockey.mp4 +3 -0
app.py
CHANGED
|
@@ -281,7 +281,7 @@ def process_images(user_text, input_images, max_tokens):
|
|
| 281 |
**inputs,
|
| 282 |
logits_processor=model.build_logit_processor_from_inputs(inputs),
|
| 283 |
max_new_tokens=int(max_tokens),
|
| 284 |
-
temperature=0
|
| 285 |
)
|
| 286 |
|
| 287 |
generated_tokens = output[0, inputs["input_ids"].size(1):]
|
|
@@ -362,6 +362,7 @@ def process_video(user_text, video_path, frame_sample_mode, max_frames, max_fps,
|
|
| 362 |
**inputs,
|
| 363 |
logits_processor=model.build_logit_processor_from_inputs(inputs),
|
| 364 |
max_new_tokens=int(max_tokens),
|
|
|
|
| 365 |
)
|
| 366 |
|
| 367 |
generated_tokens = output[0, inputs["input_ids"].size(1):]
|
|
@@ -505,6 +506,7 @@ with gr.Blocks() as demo:
|
|
| 505 |
gr.Markdown("### Video Tracking Examples")
|
| 506 |
gr.Examples(
|
| 507 |
examples=[
|
|
|
|
| 508 |
["example-videos/penguins.mp4", "Track all the penguins."],
|
| 509 |
["example-videos/arena_basketball.mp4", "Track the players in yellow uniform in 1 fps."],
|
| 510 |
],
|
|
@@ -620,4 +622,4 @@ with gr.Blocks() as demo:
|
|
| 620 |
)
|
| 621 |
|
| 622 |
if __name__ == "__main__":
|
| 623 |
-
demo.launch(css=css, mcp_server=True, ssr_mode=False, show_error=True)
|
|
|
|
| 281 |
**inputs,
|
| 282 |
logits_processor=model.build_logit_processor_from_inputs(inputs),
|
| 283 |
max_new_tokens=int(max_tokens),
|
| 284 |
+
temperature=0.0
|
| 285 |
)
|
| 286 |
|
| 287 |
generated_tokens = output[0, inputs["input_ids"].size(1):]
|
|
|
|
| 362 |
**inputs,
|
| 363 |
logits_processor=model.build_logit_processor_from_inputs(inputs),
|
| 364 |
max_new_tokens=int(max_tokens),
|
| 365 |
+
temperature=0.0
|
| 366 |
)
|
| 367 |
|
| 368 |
generated_tokens = output[0, inputs["input_ids"].size(1):]
|
|
|
|
| 506 |
gr.Markdown("### Video Tracking Examples")
|
| 507 |
gr.Examples(
|
| 508 |
examples=[
|
| 509 |
+
["example-videos/us_canada_hockey.mp4", "Track the U.S. hockey players."],
|
| 510 |
["example-videos/penguins.mp4", "Track all the penguins."],
|
| 511 |
["example-videos/arena_basketball.mp4", "Track the players in yellow uniform in 1 fps."],
|
| 512 |
],
|
|
|
|
| 622 |
)
|
| 623 |
|
| 624 |
if __name__ == "__main__":
|
| 625 |
+
demo.launch(css=css, mcp_server=True, ssr_mode=False, show_error=True, share=True)
|
example-videos/us_canada_hockey.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8559d304300d1035843fc08d1416b942b0ed57e019cfb6d617e5b65718f73e73
|
| 3 |
+
size 1176925
|