Pratyush101 commited on
Commit
d64ad08
·
verified ·
1 Parent(s): 9866e5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -45,7 +45,7 @@ def calculate_angle(a, b, c):
45
  counterL=0#Counter checks for number of curls
46
  correct=0
47
  incorrect=0
48
- stage=None#it checks if we our hand is UP or DOWN
49
 
50
  # Detection Queue
51
  result_queue: "queue.Queue[List[Detection]]" = queue.Queue()
@@ -139,12 +139,10 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
139
  # stage='up'
140
 
141
  # stage 4
142
- if (80 < angleKneeL < 110) and stage=='mid':
143
  if (18 < angleHipL < 40): # Valid "down" position
144
  correct+=1
145
  stage='up'
146
- else:
147
- stage='mid'
148
 
149
 
150
 
 
45
  counterL=0#Counter checks for number of curls
46
  correct=0
47
  incorrect=0
48
+ stage='mid'#it checks if we our hand is UP or DOWN
49
 
50
  # Detection Queue
51
  result_queue: "queue.Queue[List[Detection]]" = queue.Queue()
 
139
  # stage='up'
140
 
141
  # stage 4
142
+ if (80 < angleKneeL < 110)':
143
  if (18 < angleHipL < 40): # Valid "down" position
144
  correct+=1
145
  stage='up'
 
 
146
 
147
 
148