Kaushik066 commited on
Commit
8530dc1
·
1 Parent(s): c45074e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -51,8 +51,8 @@ data_path = 'signs'
51
  # Custom CSS to control output video size
52
  custom_css = """
53
  #landmarked_video {
54
- max-height: 600px;
55
- width: auto;
56
  }
57
  """
58
 
@@ -245,7 +245,7 @@ def prod_function(model_pretrained, prod_ds):
245
  return prod_pred
246
 
247
  # Function to get landmarked video
248
- def save_video_to_mp4(video_tensor, fps=15):
249
  # Convert pytorch tensor to numpy ndarray
250
  video_numpy = video_tensor.permute(0, 2, 3, 1).cpu().numpy()
251
  # Normalize values to [0, 255] if necessary
@@ -316,7 +316,7 @@ with gr.Blocks(css=custom_css) as demo:
316
 
317
  # Gesture recognition Tab
318
  with gr.Tab("Gesture recognition"):
319
- landmarked_video = gr.State([])
320
  with gr.Row(height=350, variant="panel"): # equal_height=False, show_progress=True
321
  with gr.Column(scale=1, variant="panel"):
322
  # Add webcam input for sign language video capture
 
51
  # Custom CSS to control output video size
52
  custom_css = """
53
  #landmarked_video {
54
+ max-height: 350px;
55
+ width: 500px;
56
  }
57
  """
58
 
 
245
  return prod_pred
246
 
247
  # Function to get landmarked video
248
+ def save_video_to_mp4(video_tensor, fps=10):
249
  # Convert pytorch tensor to numpy ndarray
250
  video_numpy = video_tensor.permute(0, 2, 3, 1).cpu().numpy()
251
  # Normalize values to [0, 255] if necessary
 
316
 
317
  # Gesture recognition Tab
318
  with gr.Tab("Gesture recognition"):
319
+ #landmarked_video = gr.State([])
320
  with gr.Row(height=350, variant="panel"): # equal_height=False, show_progress=True
321
  with gr.Column(scale=1, variant="panel"):
322
  # Add webcam input for sign language video capture