Kaushik066 commited on
Commit
903570a
·
1 Parent(s): 9bc671f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
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
- # Add webcam input for sign language video capture
273
- video_input = gr.Video(format="mp4")
274
- # Add a button or functionality to process the video
275
- test_output = gr.Textbox()
276
- # Submit the Video
277
- video_button = gr.Button("Submit")
 
 
 
 
 
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()