Spaces:
Running
on
Zero
Running
on
Zero
added one example attached with the code
Browse files
app.py
CHANGED
@@ -565,29 +565,45 @@ This app uses TTIC's foundation model SHuBERT (introduced in an ACL 2025 paper,
|
|
565 |
else:
|
566 |
print(f"Warning: File not found at {src_path}")
|
567 |
dailymoth_pathlist = []
|
568 |
-
|
569 |
-
|
570 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
|
572 |
|
573 |
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
|
592 |
return interface
|
593 |
|
|
|
565 |
else:
|
566 |
print(f"Warning: File not found at {src_path}")
|
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}")
|
571 |
+
|
572 |
+
with gr.Row():
|
573 |
+
video_input = gr.Video(label="ASL Video (under 20 seconds)", format="mp4", height=480, width=640)
|
574 |
+
output_text = gr.Textbox(label="English Translation", lines=5)
|
575 |
+
|
576 |
+
submit_btn = gr.Button("Translate", variant="primary")
|
577 |
+
submit_btn.click(fn=process_video, inputs=video_input, outputs=output_text)
|
578 |
+
|
579 |
+
gr.Examples(
|
580 |
+
examples=dailymoth_pathlist,
|
581 |
+
inputs=video_input,
|
582 |
+
label="Click a video to try an example"
|
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)
|
587 |
|
588 |
|
589 |
|
590 |
+
# interface = gr.Interface(
|
591 |
+
# fn=process_video,
|
592 |
+
# inputs=video_input,
|
593 |
+
# outputs=text_output,
|
594 |
+
# title="ASL Video to English Text Translation",
|
595 |
+
# description=description,
|
596 |
+
# article="",
|
597 |
+
# # examples=dailymoth_pathlist,
|
598 |
+
# # example_labels=["Officials with an EU force said they are searching for the missing."],
|
599 |
+
# allow_flagging="never",
|
600 |
+
# )
|
601 |
|
602 |
+
# gr.Examples(
|
603 |
+
# examples=dailymoth_pathlist,
|
604 |
+
# inputs=video_input,
|
605 |
+
# label="Click a video to try an example"
|
606 |
+
# )
|
607 |
|
608 |
return interface
|
609 |
|