Commit
·
903570a
1
Parent(s):
9bc671f
Update app.py
Browse files
app.py
CHANGED
@@ -264,19 +264,24 @@ def translate_sign_language(gesture):
|
|
264 |
#for val in np.array(predicted_prod_label.cpu().numpy()):
|
265 |
# gesture_translation = idx_to_label[val]
|
266 |
|
267 |
-
return gesture_translation
|
268 |
|
269 |
with gr.Blocks() as demo:
|
270 |
gr.Markdown("# Indian Sign Language Translation App")
|
271 |
with gr.Tab("Gesture recognition"):
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
278 |
# Set up the interface
|
279 |
-
video_button.click(translate_sign_language, inputs=video_input, outputs=test_output)
|
280 |
|
281 |
if __name__ == "__main__":
|
282 |
demo.launch()
|
|
|
264 |
#for val in np.array(predicted_prod_label.cpu().numpy()):
|
265 |
# gesture_translation = idx_to_label[val]
|
266 |
|
267 |
+
return prod_ds, gesture_translation
|
268 |
|
269 |
with gr.Blocks() as demo:
|
270 |
gr.Markdown("# Indian Sign Language Translation App")
|
271 |
with gr.Tab("Gesture recognition"):
|
272 |
+
with gr.Row():
|
273 |
+
with gr.Column(scale=2, min_width=300):
|
274 |
+
# Add webcam input for sign language video capture
|
275 |
+
video_input = gr.Video(format="mp4", label="Gesture")
|
276 |
+
# Submit the Video
|
277 |
+
video_button = gr.Button("Submit")
|
278 |
+
# Display the landmarked video
|
279 |
+
video_output = gr.Video(streaming=True, label="Landmarked Gesture")
|
280 |
+
with gr.Row():
|
281 |
+
# Add a button or functionality to process the video
|
282 |
+
test_output = gr.Textbox(label="Translation in English")
|
283 |
# Set up the interface
|
284 |
+
video_button.click(translate_sign_language, inputs=video_input, outputs=[video_output, test_output])
|
285 |
|
286 |
if __name__ == "__main__":
|
287 |
demo.launch()
|