Commit
·
ff5a3a8
1
Parent(s):
d1f03d3
Update app.py
Browse files
app.py
CHANGED
@@ -320,25 +320,41 @@ with gr.Blocks(css=custom_css) as demo:
|
|
320 |
# Gesture recognition Tab
|
321 |
with gr.Tab("Gesture recognition"):
|
322 |
|
323 |
-
with gr.Row(height=350, variant="panel"): # equal_height=False, show_progress=True
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
with gr.Column(scale=1, variant="panel"):
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
335 |
with gr.Column(scale=1, variant="panel"):
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
# Set up the interface
|
343 |
video_button.click(translate_sign_language, inputs=video_input, outputs=[text_output, video_output])
|
344 |
#landmarked_video.change(translate_sign_language, inputs=landmarked_video, outputs=[text_output, video_output])
|
|
|
320 |
# Gesture recognition Tab
|
321 |
with gr.Tab("Gesture recognition"):
|
322 |
|
323 |
+
#with gr.Row(height=350, variant="panel"): # equal_height=False, show_progress=True
|
324 |
+
# with gr.Column(scale=1, variant="panel"):
|
325 |
+
# # Add webcam input for sign language video capture
|
326 |
+
# video_input = gr.Video(sources=["webcam"], format="mp4", label="Gesture")
|
327 |
+
# with gr.Column(scale=1, variant="panel"):
|
328 |
+
# # Display the landmarked video
|
329 |
+
# video_output = gr.Video(interactive=False, autoplay=True,
|
330 |
+
# streaming=False, label="Landmarked Gesture",
|
331 |
+
# elem_id="landmarked_video"
|
332 |
+
# )
|
333 |
+
#with gr.Row(variant="panel"): # equal_height=False, show_progress=True
|
334 |
+
# with gr.Column(scale=1, variant="panel"):
|
335 |
+
# # Submit the Video
|
336 |
+
# video_button = gr.Button("Submit")
|
337 |
+
# with gr.Column(): #scale=1, variant="panel"
|
338 |
+
# # Add a button or functionality to process the video
|
339 |
+
# text_output = gr.Textbox(label="Translation in English")
|
340 |
+
|
341 |
+
with gr.Row():
|
342 |
with gr.Column(scale=1, variant="panel"):
|
343 |
+
with gr.Row(height=350, variant="panel"):
|
344 |
+
# Add webcam input for sign language video capture
|
345 |
+
video_input = gr.Video(sources=["webcam"], format="mp4", label="Gesture")
|
346 |
+
with gr.Row(variant="panel"):
|
347 |
+
# Submit the Video
|
348 |
+
video_button = gr.Button("Submit")
|
349 |
+
# Add a button or functionality to process the video
|
350 |
+
text_output = gr.Textbox(label="Translation in English")
|
351 |
with gr.Column(scale=1, variant="panel"):
|
352 |
+
with gr.Row():
|
353 |
+
# Display the landmarked video
|
354 |
+
video_output = gr.Video(interactive=False, autoplay=True,
|
355 |
+
streaming=False, label="Landmarked Gesture",
|
356 |
+
elem_id="landmarked_video"
|
357 |
+
)
|
358 |
# Set up the interface
|
359 |
video_button.click(translate_sign_language, inputs=video_input, outputs=[text_output, video_output])
|
360 |
#landmarked_video.change(translate_sign_language, inputs=landmarked_video, outputs=[text_output, video_output])
|