Pratyush101 commited on
Commit
8864ad8
·
verified ·
1 Parent(s): 0b95990

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -70,6 +70,8 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
70
  global indexImg, output_text
71
 
72
  img = frame.to_ndarray(format="bgr24")
 
 
73
  result = hands.process(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
74
 
75
  # Create the keyboard buttons
 
70
  global indexImg, output_text
71
 
72
  img = frame.to_ndarray(format="bgr24")
73
+ # Mirror the image horizontally
74
+ img = cv2.flip(img, 1) # Flip code 1 means horizontal flip
75
  result = hands.process(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
76
 
77
  # Create the keyboard buttons