Spaces:
Running
on
Zero
Running
on
Zero
Added more examples
Browse files- app.py +53 -13
- dailymoth_examples/L5hUxT5YbnY_crop_1.mp4 +3 -0
- dailymoth_examples/L5hUxT5YbnY_crop_2.mp4 +2 -2
- dailymoth_examples/L5hUxT5YbnY_crop_3.mp4 +3 -0
- dailymoth_examples/L5hUxT5YbnY_crop_4.mp4 +3 -0
- dailymoth_examples/L5hUxT5YbnY_crop_5.mp4 +3 -0
- dailymoth_examples/L5hUxT5YbnY_crop_6.mp4 +3 -0
- dailymoth_examples/L5hUxT5YbnY_crop_7.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_1.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_10.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_2.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_3.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_4.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_5.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_6.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_7.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_8.mp4 +3 -0
- dailymoth_examples/rDUefZVPfmU_crop_9.mp4 +3 -0
app.py
CHANGED
@@ -556,15 +556,32 @@ This app uses TTIC's foundation model SHuBERT (introduced in an ACL 2025 paper,
|
|
556 |
# dailymoth_pathlist = download_example_videos()
|
557 |
|
558 |
src_dir = os.path.dirname(os.path.abspath(__file__))
|
559 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
src_path = os.path.join(src_dir, filename)
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
dailymoth_pathlist = []
|
568 |
|
569 |
with gr.Blocks(title="ASL Video to English Text Translation") as interface:
|
570 |
gr.Markdown(f"# ASL Video to English Text Translation\n\n{description}")
|
@@ -576,11 +593,34 @@ This app uses TTIC's foundation model SHuBERT (introduced in an ACL 2025 paper,
|
|
576 |
submit_btn = gr.Button("Translate", variant="primary")
|
577 |
submit_btn.click(fn=process_video, inputs=video_input, outputs=output_text)
|
578 |
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
|
585 |
# video_input = gr.Video(label="ASL Video (under 20 seconds)", format="mp4", height=480, width=640)
|
586 |
# text_output = gr.Textbox(label="English Translation", lines=5)
|
|
|
556 |
# dailymoth_pathlist = download_example_videos()
|
557 |
|
558 |
src_dir = os.path.dirname(os.path.abspath(__file__))
|
559 |
+
dailymoth_pathlist = []
|
560 |
+
L5hUxT5YbnY_crop_1 = "dailymoth_examples/L5hUxT5YbnY_crop_1.mp4"
|
561 |
+
L5hUxT5YbnY_crop_2 = "dailymoth_examples/L5hUxT5YbnY_crop_2.mp4"
|
562 |
+
L5hUxT5YbnY_crop_3 = "dailymoth_examples/L5hUxT5YbnY_crop_3.mp4"
|
563 |
+
L5hUxT5YbnY_crop_4 = "dailymoth_examples/L5hUxT5YbnY_crop_4.mp4"
|
564 |
+
L5hUxT5YbnY_crop_5 = "dailymoth_examples/L5hUxT5YbnY_crop_5.mp4"
|
565 |
+
L5hUxT5YbnY_crop_6 = "dailymoth_examples/L5hUxT5YbnY_crop_6.mp4"
|
566 |
+
L5hUxT5YbnY_crop_7 = "dailymoth_examples/L5hUxT5YbnY_crop_7.mp4"
|
567 |
+
rDUefZVPfmU_crop_1 = "dailymoth_examples/rDUefZVPfmU_crop_1.mp4"
|
568 |
+
rDUefZVPfmU_crop_2 = "dailymoth_examples/rDUefZVPfmU_crop_2.mp4"
|
569 |
+
rDUefZVPfmU_crop_3 = "dailymoth_examples/rDUefZVPfmU_crop_3.mp4"
|
570 |
+
rDUefZVPfmU_crop_4 = "dailymoth_examples/rDUefZVPfmU_crop_4.mp4"
|
571 |
+
rDUefZVPfmU_crop_5 = "dailymoth_examples/rDUefZVPfmU_crop_5.mp4"
|
572 |
+
rDUefZVPfmU_crop_6 = "dailymoth_examples/rDUefZVPfmU_crop_6.mp4"
|
573 |
+
rDUefZVPfmU_crop_7 = "dailymoth_examples/rDUefZVPfmU_crop_7.mp4"
|
574 |
+
rDUefZVPfmU_crop_8 = "dailymoth_examples/rDUefZVPfmU_crop_8.mp4"
|
575 |
+
rDUefZVPfmU_crop_9 = "dailymoth_examples/rDUefZVPfmU_crop_9.mp4"
|
576 |
+
rDUefZVPfmU_crop_10 = "dailymoth_examples/rDUefZVPfmU_crop_10.mp4"
|
577 |
+
|
578 |
src_path = os.path.join(src_dir, filename)
|
579 |
+
for filename in [L5hUxT5YbnY_crop_1, L5hUxT5YbnY_crop_2, L5hUxT5YbnY_crop_3, L5hUxT5YbnY_crop_4, L5hUxT5YbnY_crop_5, L5hUxT5YbnY_crop_6, L5hUxT5YbnY_crop_7, rDUefZVPfmU_crop_1, rDUefZVPfmU_crop_2, rDUefZVPfmU_crop_3, rDUefZVPfmU_crop_4, rDUefZVPfmU_crop_5, rDUefZVPfmU_crop_6, rDUefZVPfmU_crop_7, rDUefZVPfmU_crop_8, rDUefZVPfmU_crop_9, rDUefZVPfmU_crop_10]:
|
580 |
+
src_path = os.path.join(src_dir, filename)
|
581 |
+
if os.path.exists(src_path):
|
582 |
+
dailymoth_pathlist.append(src_path)
|
583 |
+
else:
|
584 |
+
print(f"Warning: File not found at {src_path}")
|
|
|
585 |
|
586 |
with gr.Blocks(title="ASL Video to English Text Translation") as interface:
|
587 |
gr.Markdown(f"# ASL Video to English Text Translation\n\n{description}")
|
|
|
593 |
submit_btn = gr.Button("Translate", variant="primary")
|
594 |
submit_btn.click(fn=process_video, inputs=video_input, outputs=output_text)
|
595 |
|
596 |
+
# gr.Examples(
|
597 |
+
# examples=dailymoth_pathlist,
|
598 |
+
# inputs=video_input,
|
599 |
+
# label="Click a video to try an example"
|
600 |
+
# )
|
601 |
+
|
602 |
+
|
603 |
+
# Add examples section
|
604 |
+
if dailymoth_pathlist: # Only show examples if we have valid files
|
605 |
+
gr.Examples(
|
606 |
+
examples=dailymoth_pathlist,
|
607 |
+
inputs=video_input,
|
608 |
+
label="Click a video to try an example"
|
609 |
+
)
|
610 |
+
|
611 |
+
# Add attribution note for the examples
|
612 |
+
gr.Markdown("""
|
613 |
+
---
|
614 |
+
**Example Videos Attribution:**
|
615 |
+
|
616 |
+
The example videos used in this demo are sourced from [The Daily Moth](https://www.youtube.com/@TheDailyMoth),
|
617 |
+
a popular ASL news channel made by deaf creators. Specifically, they are from the Previews of [July 10](https://www.youtube.com/watch?v=L5hUxT5YbnY&t=11s) and [July 11](https://www.youtube.com/watch?v=L5hUxT5YbnY&t) 2025 Top Stories.
|
618 |
+
|
619 |
+
|
620 |
+
The videos are only used for illustrative purposes, but all rights to the content belong to The DailyMoth. In this light, we encourage to subsribe to this [channel](https://members.dailymoth.com/about).
|
621 |
+
""")
|
622 |
+
else:
|
623 |
+
gr.Markdown("*No example videos available at this time.*")
|
624 |
|
625 |
# video_input = gr.Video(label="ASL Video (under 20 seconds)", format="mp4", height=480, width=640)
|
626 |
# text_output = gr.Textbox(label="English Translation", lines=5)
|
dailymoth_examples/L5hUxT5YbnY_crop_1.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:69a3f92cbaa6726f75760341a0f9828c366a252d3c8a6c88737f60c4f929c5a7
|
3 |
+
size 648140
|
dailymoth_examples/L5hUxT5YbnY_crop_2.mp4
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e6c1f733b81a3cae41b16571ab72a52e2ecdeaa8b9b56f6a14feb244ecfe386
|
3 |
+
size 453436
|
dailymoth_examples/L5hUxT5YbnY_crop_3.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:202103bd4cb8937d356a34180840ef48730381e27f416d1af5e5a2846e3fa5b8
|
3 |
+
size 722296
|
dailymoth_examples/L5hUxT5YbnY_crop_4.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3df44291336c66dacf0e6b0d85be87934f8990610ef094d11ddffd9e1c73807d
|
3 |
+
size 581842
|
dailymoth_examples/L5hUxT5YbnY_crop_5.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:94ec49e8387974753c8b0a40abe8f93d8d368380afc72569d5fc64420a0e0f49
|
3 |
+
size 685362
|
dailymoth_examples/L5hUxT5YbnY_crop_6.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c9728c1110db1abd7bc2a586d4a8cefd50ae2179857faa354a3333991679dbf1
|
3 |
+
size 843380
|
dailymoth_examples/L5hUxT5YbnY_crop_7.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:162fb057b9910c93584cbea26c44532bf5430437bd5c598039f627de3a6bb3f0
|
3 |
+
size 757913
|
dailymoth_examples/rDUefZVPfmU_crop_1.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8592ed25da3d91570012de352cf566533b01f5d04240fdf15410d2a5ad7a15cb
|
3 |
+
size 559265
|
dailymoth_examples/rDUefZVPfmU_crop_10.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:67ea20b6ed24b9ad8ab553d8096d12606b5317795585748c19e28d8bbeb1ffce
|
3 |
+
size 468819
|
dailymoth_examples/rDUefZVPfmU_crop_2.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d87094173b3727b555afa2e9aa7f36cd553e0a93237aee1cdd5b12508eb130a4
|
3 |
+
size 451347
|
dailymoth_examples/rDUefZVPfmU_crop_3.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63338cd21f7754a4f491bfa9485be90df5886f1bacc0b1ff2e01f3b582be4bb2
|
3 |
+
size 512505
|
dailymoth_examples/rDUefZVPfmU_crop_4.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b9ccc5d69825f90a0db2e7397c6af286a15d9db4bfb42e9c9aee9abe6b98abb3
|
3 |
+
size 447813
|
dailymoth_examples/rDUefZVPfmU_crop_5.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fbf674be1cba8278f83ae206770c93b20e53fb69d6feca38f9217cea18e52a60
|
3 |
+
size 485240
|
dailymoth_examples/rDUefZVPfmU_crop_6.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ba805e2d23996389c9b9530837ecba052d6f106939398736a685c84eb5e888c7
|
3 |
+
size 461859
|
dailymoth_examples/rDUefZVPfmU_crop_7.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:098408a0283534439a4182025db2c7bc45341300583da06f9795322aa932ad77
|
3 |
+
size 554760
|
dailymoth_examples/rDUefZVPfmU_crop_8.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7c671492a9193acefa16b989fe5711414545923836bd1b0bf13195d282a7113f
|
3 |
+
size 574088
|
dailymoth_examples/rDUefZVPfmU_crop_9.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b2052cc5e86dac829378a62c19cfbaf75be5460bff289ae58ac596d731a5ed35
|
3 |
+
size 485668
|