ehsanhon commited on
Commit
41e0fb1
·
verified ·
1 Parent(s): 584a667

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -191,7 +191,7 @@ def calculate_and_display_angles(image_path, return_angles=False):
191
  mp_pose = mp.solutions.pose
192
  pose = mp_pose.Pose(min_detection_confidence=0.5, min_tracking_confidence=0.5)
193
 
194
- # image = cv2.imread(image_path)
195
  file_bytes = np.asarray(bytearray(image_path.read()), dtype=np.uint8)
196
  image = cv2.imdecode(file_bytes, cv2.IMREAD_COLOR)
197
  image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
 
191
  mp_pose = mp.solutions.pose
192
  pose = mp_pose.Pose(min_detection_confidence=0.5, min_tracking_confidence=0.5)
193
 
194
+ image_path.seek(0) # rewind to the beginning
195
  file_bytes = np.asarray(bytearray(image_path.read()), dtype=np.uint8)
196
  image = cv2.imdecode(file_bytes, cv2.IMREAD_COLOR)
197
  image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)