Kaushik066 commited on
Commit
ee267fe
·
1 Parent(s): dcdc92d

Update app_swin.py

Browse files
Files changed (1) hide show
  1. app_swin.py +4 -4
app_swin.py CHANGED
@@ -324,7 +324,7 @@ def translate_sign_language(gesture):
324
  predicted_prod_label = predicted_prod_label.squeeze(0)
325
  gesture_translation = idx_to_label[predicted_prod_label.cpu().numpy().item()] # Convert to a scalar
326
 
327
- return gesture_translation, video_tensor, prod_video_path # frame_generator
328
 
329
  # Function to read the about.md file
330
  def load_about_md():
@@ -351,8 +351,8 @@ with gr.Blocks(css=custom_css) as demo:
351
  video_button = gr.Button("Submit")
352
  # Add a button or functionality to process the video
353
  text_output = gr.Textbox(label="Translation in English")
354
- with gr.Row(variant="panel"):
355
- output_tensor = gr.Textbox(label="saved video tensor")
356
  with gr.Column(scale=1, variant="panel"):
357
  with gr.Row():
358
  # Display the landmarked video
@@ -361,7 +361,7 @@ with gr.Blocks(css=custom_css) as demo:
361
  #elem_id="landmarked_video"
362
  )
363
  # Set up the interface
364
- video_button.click(translate_sign_language, inputs=video_input, outputs=[text_output, output_tensor, video_output])
365
 
366
  # Indian Sign Language gesture reference tab
367
  with gr.Tab("Indian Sign Language gesture reference"):
 
324
  predicted_prod_label = predicted_prod_label.squeeze(0)
325
  gesture_translation = idx_to_label[predicted_prod_label.cpu().numpy().item()] # Convert to a scalar
326
 
327
+ return gesture_translation, prod_video_path # frame_generator, video_tensor
328
 
329
  # Function to read the about.md file
330
  def load_about_md():
 
351
  video_button = gr.Button("Submit")
352
  # Add a button or functionality to process the video
353
  text_output = gr.Textbox(label="Translation in English")
354
+ #with gr.Row(variant="panel"):
355
+ # output_tensor = gr.Textbox(label="saved video tensor")
356
  with gr.Column(scale=1, variant="panel"):
357
  with gr.Row():
358
  # Display the landmarked video
 
361
  #elem_id="landmarked_video"
362
  )
363
  # Set up the interface
364
+ video_button.click(translate_sign_language, inputs=video_input, outputs=[text_output, video_output])
365
 
366
  # Indian Sign Language gesture reference tab
367
  with gr.Tab("Indian Sign Language gesture reference"):